![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C语言
我家空空
这个作者很懒,什么都没留下…
展开
-
C语言找出字符串中出现次数最多的字符
#incude <stdio.h>#include <stdlib.h>int main(){ printf("输入字符串:\n"); //用来存储输入的字符串 char cs[1024]; scanf("%s", cs); int count[256] = {0}; for(int i=0; cs[i]; i++) count[cs[i]]++; int max = -1; char c = 0; for(int i=0; i<256; i++){转载 2020-11-08 21:51:20 · 22327 阅读 · 8 评论 -
c语言strlen函数的原型及用法
原型unsigned int strlen(const char *str);用法#include<stdio.h>#include<string.h>int main(){ int a[3]="I love China"; int length=(int)strlen(a); printf("%d",length); return 0;}原型实...转载 2020-01-11 22:48:06 · 3723 阅读 · 4 评论