main()函数可以有返回值,也可以没有返回值
A: #includeintmain(){printf("helloworld");return0;}
B: #includeintman(){printf("helloworld");return0;}
C: #includeintmain(){printf("helloworld")return0;}
D: #includeintmain(){print("helloworld");return0;}
A: #includeintmain(){printf("helloworld");return0;}
B: #includeintman(){printf("helloworld");return0;}
C: #includeintmain(){printf("helloworld")return0;}
D: #includeintmain(){print("helloworld");return0;}
举一反三
- 中国大学MOOC:请写出以下程序的运行结果#includeintmain(){printf(HelloWorld!\n);return0;}
- 下面程序执行后的输出结果是()。#includeintmain(){inti=0,s=0;for(;;){if(i==3||i==5)continue;if(i==6)break;i++;s+=i;};printf("%d",s);return0;}#includeintmain(){inti=0,s=0;for(;;){if(i==3||i==5)continue;if(i==6)break;i++;s+=i;};printf("%d",s);return0;}#includeintmain(){inti=0,s=0;for(;;){if(i==3||i==5)continue;if(i==6)break;i++;s+=i;};printf("%d",s);return0;}#includeintmain(){inti=0,s=0;for(;;){if(i==3||i==5)continue;if(i==6)break;i++;s+=i;};printf("%d",s);return0;} A: 10 B: 13 C: 21 D: 死循环
- 下面程序的运行结果是()。#includeintmain(){intx=2;do{printf(“*”);x--;}while(!x==0);return0;}
- 下面程序的错误是() #include intmian() { printf("helloworld") return0; }
- 下面程序的运行结果是()。#includeintmain(){inti;for(i=0;i<10;i++);printf(“%d”,i);return0;}