首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >C程序查找字符串长度

C程序查找字符串长度

作者头像
用户7886150
修改于 2021-02-08 09:59:56
修改于 2021-02-08 09:59:56
1.9K0
举报
文章被收录于专栏:bit哲学院bit哲学院

参考链接: C++程序查找字符串的长度

#include<stdio.h> #include<conio.h> 

  void main() { int i; char str[50]; clrscr(); printf(“Enter a string:”); gets(str); 

   for(i=0;str[i]!=’’;++i); printf(“Lenth of string is %d”,i); getch(); } 

   #include<stdio.h> #include<conio.h> 

  void main() { int i; char str[50]; clrscr(); printf(“Enter a string :”); gets(str); 

   for(i=0;str[i]!=’’;++i); printf(“ Lenth of string is %d”,i); getch(); }  

  翻译自: https://www.thecrazyprogrammer.com/2013/05/c-program-to-find-length-of-string.html

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档