下列程序段正确的是______。
A: #include <stdio.h> main() { int i, j; int(i)=j; }
B: #include <stdio.h>; include <stdio.h> #include <stdio.h> main() { }
C: main() { int i, j; }
D: main() { }
A: #include <stdio.h> main() { int i, j; int(i)=j; }
B: #include <stdio.h>; include <stdio.h> #include <stdio.h> main() { }
C: main() { int i, j; }
D: main() { }
举一反三
- 使用库函数前包含头文件stdio。h的正确命令是( )。 A: @include<stdio.h> B: #include<stdio.h> C: #include stdio.h D: #include”stdio.h”
- 以下程序正确的是_____ A: B: include<;stdio.h>;int gNum;gNum=13;void main(){printf("%d\n", gNum);} C: D: include<;stdio.h>;void main(){int rob=17;printf("rob=%d\n", rop);}int rop=71; E: F: include<;stdio.h>;void main(){extern int outer;printf("outer=%d\n", outer);}int outer=33; G: H: include<;stdio.h>;void main(){extern int outer=33;printf("outer=%d\n", outer);}int outer=33;
- 以下程序没有语法问题的是() A: B: include<;stdio.h>;int main( ){int x , y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;} C: D: include<;stdio.h>;int main( ){int x = 3 ;y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;} E: F: include<;stdio.h>;int main( ){int x = 3 ,y ; printf( "%d\n" , x / y ) ;y = 5; return 0 ;} G: H: include<;stdio.h>;int main( ){int x = 3 , y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;}
- 【单选题】下面程序执行后的输出结果是()。#include <stdio.h>int main(){int i=0,s=0;for (;;) {if(i==3||i==5) continue;if (i==6) break;i++; s+=i;};printf("%d",s); return 0;}#include <stdio.h>int main(){int i=0,s=0;for (;;) {if(i==3||i==5) continue;if (i==6) break;i++; s+=i;};printf("%d",s); return 0;}#include <stdio.h>int main(){int i=0,s=0;for (;;) {if(i==3||i==5) continue;if (i==6) break;i++; s+=i;};printf("%d",s); return 0;}#include <stdio.h>int main(){int i=0,s=0; A. 10 B. 13 C. 21 D. 死循环
- Which of the following program is right? A: include <stdio.h> int main(); { /*programming*/ printf("programming!\n"); return 0; } B: include <stdio.h> int main() { /*programming*/ printf("programming!\n"); return 0; } C: include <stdio.h> void main() { /*programming*/ printf("programming!\n") return 0; } D: include <stdio.h> int mian() { /*programming*/ printf("programming!\n"); return 0; }