作业帮 > 综合 > 作业

# include <stdio.h> main() { char s[]={"012xy&quo

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/04/29 18:12:18
# include <stdio.h> main() { char s[]={"012xy"}; int i,n=0; for (i=0; s[i]!
#include
main()
{ char s[]={“012xy”};int i,n=0;
for(i=0;s[i]!=0;i++)
if(s[i]>=’a’&&s[i]
要答案的话,把程序运行一下就知道拉.我觉得就是A,因为s[0]==0,当i==0时,s[i]!=0为假,跳出循环,此时n没变,仍是0.若是判断字符是否结束,判断条件应是:s[i]!='\0';