#include int m; int main(void) { int a=3; m+=a+5; printf("m=%d,a=%d",m,a); return 0; }
举一反三
- 以下程序中,运行结果是36的有()。 A: include <stdio.h> B: define M(y) y*y int main() { printf("%d\n",M(6+0)); return 0; } C: include <stdio.h> D: define M(y) (y)*(y) int main() { printf("%d\n",M(6+0)); return 0; } E: include <stdio.h> int M(int y) { return y*y; } int main() { printf("%d\n",M(6+0)); return 0; } F: include <stdio.h> int M(int y) { return (y)*(y); } int main() { printf("%d\n",M(6+0)); return 0; }
- 下面程序段的运行结果是____。 int m=10; int f(int x,int y) {int m=5; m+=x*y; return m; } void main() {int a=6,b=7; printf("%d",f(a,b)/m); }
- 以下程序中,运行结果是36的有()。 A: B: include <stdio.h> C: define M(y) y*y int main() { printf("%d ",M(6+0)); return 0; } D: E: include <stdio.h> F: define M(y) (y)*(y) int main() { printf("%d ",M(6+0)); return 0; } G: H: include <stdio.h> int M(int y) { return y*y; } int main() { printf("%d ",M(6+0)); return 0; } I: J: include <stdio.h> int M(int y) { return (y)*(y); } int main() { printf("%d ",M(6+0)); return 0; }
- 有下列程序,程序运行后的输出结果是( )。 #include int func(int a,int b); int main() { int k=4,m=1,p; p=func(k,m); printf("%d ",p); p=func(k,m); printf("%d ",p); return 0; } int func(int a,int b) { int m=0,i=2; i+=m+1; m=i+a+b; return(m); } { int m=0,i=2; i+=m+1; m=i+a+b; return(m); }
- 以下程序的运行结果是( )。#include [stdio.h]int f(int m, int n){ return m > n ? m : n;}main(){ int x = f(5, 3); printf("%d\n", x);}