耐水腻子是防水腻子吗:编程求一个字符串的长度, 用字符数组实现
来源:百度文库 编辑:杭州交通信息网 时间:2024/05/04 14:47:37
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