计算机二级C语言程序设计
VIP题库
有以下程序#include #include typedef struct stu {char name[10];char gender;int score; } STU;void f(char *name, char *gender, int *score){ strcpy(name, "Qian");*gender = ''f'';*score = 350;}main(){ STU a = {"Zhao", ''m'', 290}, b;b = a;f(b.name, &b.gender, &b.score);printf("%s,%c,%d,", a.name, a.gender, a.score);printf("%s,%c,%d\n", b.name, b.gender, b.score);}程序运行后的输出结果是______。
设有以下说明语句typedef struct{ int n;char ch[8];}PER;则下面叙述中正确的是______。
有以下程序 #include struct S{ int a;int b; }; main() { struct S a, *p=&a; a.a=99; printf( "%d\n" , ______ ); }程序要求输出结构体中成员a的数据,以下不能填入横线处的内容是______。
若有以下语句typedef struct S{ int g; char h;}T;以下叙述中正确的是______。
设有定义#include #include typedef struct { int x, y; } T;typedef struct{ int x, y; } *USER;USER fun(){ USER p;p=(USER)malloc(sizeof(T));p->x=1;p->y=2;return p;}函数fun返回值的类型是______。
设有以下语句typedef struct TT{char c; int a[4];}CIN;则下面叙述中正确的是______。
以下选项中,不能定义结构体变量std的是______。
若有定义typedef int *T;T a[20];则以下与上述定义中a类型完全相同的是______。
有以下程序段typedef struct node{int data; struct node *next; } *NODE;NODE p;以下叙述中正确的是______。
设有以下程序段struct MP3{ char name[20];char color;float price;}std,*ptr;ptr=&std;若要引用结构体变量std中的color成员,写法错误的是______。
«
1
2
3
4
5
6
7
8
...
149
150
»