下列函数在屏幕上输出的结果是? # include int main(void ) { printf("学号 姓名 班级 "); return 0; }
举一反三
- 下列程序的运行结果是( ) #include void fun(); int a=5; int main() { int a=10; fun(); printf("%5d",a); return 0; } void fun() { a=a+5; printf("%5d",a); }
- 下面程序的输出结果是_______。 #include void increment(void); int main(void) { increment(); increment(); increment(); return 0; } void increment(void) { int x = 0; x += 1; printf("%d ", x); }
- 下列程序运行后的输出结果为。 # include <stdio.h> int num; void fun { printf ( "%d, ", num ); } int main { int num = 3; fun ; printf ( "%d,", num ); return 0; }
- 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; }
- 以下程序的输出结果是______ 。#include int f(int n) { if(n == 1) return 1; else return n + f(n - 1);}int main(void) { printf("%d\n", f(5)); return 0;}