题目内容

以下对结构体变量stu1中成员age的非法引用是______。 struct student { int age; int num; }stu1, *p; p=&stu1;

A. stu1.age
B. student.age
C. p->age
D. (*p).age

查看答案
更多问题

以下程序的输出结果是______。 #define f(x) x*x #include <stdio.h> main() { int a=6, b=2, c; c=f(a)/f(b); printf("% d\n", c); }

A. 9
B. 6
C. 36
D. 18

已知: union { int i; char c; float a; } test; 则sizeof(test)的值是______。

A. 4
B. 5
C. 6
D. 7

若有宏定义#define MOD(x, y) x%y,则执行以下语句后的输出为______。 int z, a=15, b=100; z=MOD (b, a); printf("% d\n", z++);

A. 11
B. 10
C. 6
D. 宏定义不合法

有以下程序: #define N 2 #define M N +1 #define NUM 2 * M+1 main() { int i; for(i=1; i<=NUM; i++) printf("% d\n", i); } 该程序中的for循环执行的次数是______。

A. 5
B. 6
C. 7
D. 8

答案查题题库