Problem C: 指针:自定义函数length,调用它计算字符串的长度
2024-08-28 01:08:37
#include<stdio.h>
int length(char*s)
{
int i,count;
while(*s!='\0')
{
*(s++);
count++;
}
return count;
} int main()
{
char s[];
while(gets(s)!=NULL)
{
int t;
t=length(s);
printf("%d\n",t);
}
return ;
}
最新文章
- GOLANG 声明
- phpcms后台获取当前登录账号的数据
- 基于webrtc的视频通话时webrtc的接口调用流程
- 微分方程&mdash;&mdash;基本概念和常微分方程的发展史
- (转)win32Application和win32ApplicationConsole
- Xamarin.Android开发实践(十八)
- Redis缓存服务搭建及实现数据读写
- netstat命令[转]
- MongoDB五种树形结构表示法
- C#中关于DateTime的最大值和最小值
- BZOJ 1622: [Usaco2008 Open]Word Power 名字的能量
- ffmpeg ffplay ffprobe资料整理
- 剑指Offer——银行网申内容模版
- Gitlab管理网页老是500错误?增加物理内存,增加cpu吧
- Objective-C RunTime 学习笔记 之 atomic/nonatomic 关键字
- 我为什么要选择RabbitMQ ,RabbitMQ简介,各种MQ选型对比(转载)
- Nginx SSL TLS部署最佳实践
- Qt5_选择文件对话框
- Linux 对文件进行加密存放
- chrome浏览器调试报错:Failed to load resource: the server responsed width a status of 404 (Not Found)&hellip;http://127.0.0.1:5099/favicon.ico