皮带尺码怎么选:编程求一个字符串的长度, 用字符数组实现
来源:百度文库 编辑:神马品牌网 时间:2024/04/29 06:01:29
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