题库 第6168页
单选题:以下程序的输出结果是( )。
以下程序的输出结果是( )。```struct stu{ int x; int *y;} *p;int dt[4] = {10, 20, 30, 40};struct stu a[4] = {50, &dt[0], 60, &dt[…
单选题:设有如下定义,则错误的输入语句是( )。
设有如下定义,则错误的输入语句是( )。```struct ss{ char name[10]; int age; char sex;} std[3], *p = std;```@[B](1)A. scanf("%d",…
单选题:下列程序的输出结果是( )。
下列程序的输出结果是( )。```struct stu{ char num[10]; float score[3];};int main( ){ struct stu s[3] = {{ "20021",90,95,85}…
单选题:如果结构变量s中的生日是“1984年11月11日”,下列对其生日的正确赋值是()。
如果结构变量s中的生日是“1984年11月11日”,下列对其生日的正确赋值是()。```struct student{ int no; char name[20]; char sex; struct{ int year;…
单选题:以下定义结构变量的语句中,错误的是()。
以下定义结构变量的语句中,错误的是()。@[C](1)A. ```struct student{ int num; char name[20];} s;```B. ```struct { int num; char na…
单选题:以下程序段的输出结果为()。
以下程序段的输出结果为()。```struct { int x, y;} s[2] = { {1, 3}, {2, 7} };printf("%d\n", s[0].y/s[1].x );```@[B](1)A. 0B. 1C. 2D.…
单选题:设有如下定义,则对`data`中的`a`成员的正确引用是()。
设有如下定义,则对`data`中的`a`成员的正确引用是()。```struct sk{ int a; double b;} data, *p = &data;```@[B](1)A. (*p).data.a B. (*p).aC…
单选题:若有下列定义,则以下不合法的表达式是( )。
若有下列定义,则以下不合法的表达式是( )。```struct student{ int num; int age;};struct student stu[3] = {{101, 20}, {102, 19}, {103, 20…
单选题:根据下面的定义,能打印出字母`M`的语句是()。
根据下面的定义,能打印出字母`M`的语句是()。```struct person{ char name[10]; int age; } c[10] = { "John", 17, "Paul", 19, "Mary", 18, "Ad…
单选题:对于以下结构定义,`++p->str`中的`++`加在()。
对于以下结构定义,`++p-˃str`中的`++`加在()。```struct { int len; char *str; } *p;```@[A](1)A. 指针`str`上 B. 指针`p`上C. `str`指向的内容上D.…