历年真题
}
int f(int n) { static int a=1; n+=a++; return n; }
程序运行以后的输出结果是 A)7 B)8 C)9 D)10
(35)有以下程序 #include
#define f(x) x*x*x main() { int a=3,s,t; s=f(a+1);t=f((a+1)); printf(“%d,%d\n’,s,t); }
程序运行后的输出结果是 A)10,64 B)10,10 C)64,10 D)64,64
(36)下面结构体的定义语句中,错误的是
A)struct ord {int x;int y;int z;}; struct ord a; B)struct ord {int x;int y;int z;} struct ord a; C)struct ord {int x;int y;int z;} a; D)struct {int x;int y;int z;} a;
(37)设有定义:char *c;,以下选项中能够使字符型指针c正确指向一个字符串的是 A)char str[ ]=”string”;c=str; B)scanf(“%s”,c); C)c=getchar(); D)*c=”string”; (38)有以下程序 #include #include struct A