题目内容

设有以下说明语句: struct stu { int a; float b; } stutype; 则下面的叙述,正确的是______。

A. struct是结构体类型名
B. struct stu是用户定义的结构体变量名
C. stutype是用户定义的结构体变量名
D. a和b都是结构体变量名

查看答案
更多问题

以下程序的输出结果是______。 #include <stdio.h> int a[3][3]={1,2,3,4,5,6,7,8,9}, *p; f(int *s, int p[][3]) { *s=p[1][1]; } main() { p=(int *)malloc(sizeof(int)); f(p, a); printf("% d\n", *p); free(p); }

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

以下程序的输出是______。 #include <stdio.h> main() { struct s1 {int x; int y;}; struct s1 a={1,3}; struct s1 *b=&a; b->x=10; printf("% d% d\n", a.x, a.y); }

A. 13
B. 103
C. 310
D. 31

设有以下定义: struct sk { int a; float b; } data; int *p; 若要使p指向data中的a域,正确的赋值语句是______。

A. p=&a;
B. p=data.a;
C. p=&data.a;
D. *p=data.a;

以下正确的描述为______。

A. 每个C语言程序必须在开头使用预处理命令#include
B. 预处理命令必须位于C源程序的首部
C. 在C语言中预处理命令都以“#”开头
D. C语言的预处理命令只能实现宏定义和条件编译的功能

答案查题题库