苍井四个谎言 百度云:编程求一个字符串的长度, 用字符数组实现
来源:百度文库 编辑:中科新闻网 时间:2024/05/13 09:41:41
main()
{ char max, *s="I am a student";
int n;
max=*s;
while (*s!='\0')
{ if (*s > max) max=*s;
【 】;
}
printf("\nThe max character is: %c", max);
}
程序运行结果:
The max character is: 【 】
{ char max, *s="I am a student";
int n;
max=*s;
while (*s!='\0')
{ if (*s > max) max=*s;
【 】;
}
printf("\nThe max character is: %c", max);
}
程序运行结果:
The max character is: 【 】
楼主,这个程序是找字符串中最大的字符啊。
s++
u