网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

有以下说明和定义语句,则下列选项中引用结构变量成员的表达式中错误的是()。 struct student { int age; char num[8]; }; struct student stu[3] = {{20, "200401"},{21, "200402"},{19, "200403"}};

A.stu[0].age

B.stu[2].num

C.stu[1].num

D.stu[3].age


参考答案和解析
oat b;
更多 “有以下说明和定义语句,则下列选项中引用结构变量成员的表达式中错误的是()。 struct student { int age; char num[8]; }; struct student stu[3] = {{20, "200401"},{21, "200402"},{19, "200403"}};A.stu[0].ageB.stu[2].numC.stu[1].numD.stu[3].age” 相关考题
考题 有以下说明和定义语句 struct student { int age;char num[8]; struct student stu[3]={{20,"200401"},{21,"200402"},{19,"200403"}}; struct student *p=stu;}; 以下选项中引用结构体变量成员的表达式错误的是A.(p++)->numB.p->numC.(*p).numD.stu[3].age

考题 若有以下定义的语句 struct student {int age; int num;}; struct student stu[3]={{1001,20},{1002,19},{1003,21}}; main() {stmct student *p; p=stu; …} 则以下不正确的引用是A.(p++)->numB.p++C.(*p).numD.P=stu.age.

考题 若有结构体定义:struct stu {int num;char sex;int age;}a1,a2;则下列语句中错误的是( )。A.printf("%d%c,%d",a1);B.a2.age=a1.age;C.a1.age++;D.a1.num=5;

考题 下列说法错误的是( )。A.下列结构体定义时,占据了5个字节的空间 struct student “nt num; int age; char sex; }B.结构体的成员名可以与程序中的变量名相同C.对结构体中的成员可以单独使用,它的作用相当于普通变量D.结构体可以嵌套定义

考题 有以下说明和定义语句 struct student {int age;char num[8]; }; struct student stu[3]={{20,"200401"},{21,"200402"},{10\9,"200403"}}; struct student*p=stu;以下选项中引用结构体变量成员的表达式错误的是______。A.(p++)->numB.p->numC.*p.numD.stu[0].age

考题 struct{int num;float scor;}student;struct student std1;是对结构体类型的变量student的定义。() 此题为判断题(对,错)。

考题 有以下程序:#includestruct stu { int num;char name[10];int age;}void fun(struct stu*p){ printf(%s\n,(*p).name);}main{ struct stu students[3]={{9801,Zhang.20}, {9802,Wang,19},{9803,Zhao,1 8}}fun(students+2); }输出的结果是( )。A.ZhangB.ZhaoC.WangD.18

考题 若有以下定义的语句: struct student { int age; int num;}; struct student stu[3]={{1001,20},{1002,19},{1003,21}}; main() { struct student *p; p=stu; …} 则以下不正确的引用是( )。A.(p++)->numB.p++C.(*p).numD.P=stu.age.

考题 下列对结构及其变量定义错误的是( )。A.struct My StructB.struct MyStruct{ {int num; int num;char ch; char ch;} }My;C.strutD.struct{ {int num; int num;char ch; char ch;}My; };

考题 下列说法错误的是( )。A.下列结构体定义时,占据了5个字节的空间 struct student {int num; int age; char sex; }B.结构体的成员名可以与程序中的变量名相同C.对结构体中的成员可以单独使用,它的作用相当于普通变量D.结构体可以嵌套定义

考题 有以下说明和定义语句struct student{ int age; char num[8];};struct student stu[3]={{20,"200401"},{21,"200402"},{10\9,"200403"}};struct student *p=stu;以下选项中引用结构体变量成员的表达式错误的是A.(p++)-numB.p-numC.(*p).numD.stu[3].age

考题 若有结构体定义:struct stu{int num;char sex;int age;}al,a2;则下列语句中错误的是( )。A.printf("%d,%C,%d",a1);B.a2.age=a1.age;C.a1.age++;D.a1.num=5;

考题 有如下说明和定义语句: struct student { int age; char num{8};}; struct student stu[3]={{20,"200401"},{21,"200402"),{19,"200403"}}; struct student *p=stu; 以下选项中引用结构体变量成员的表达式错误的是( )。A.(p++)->numB.p->numC.(*p).numD.stu[3].age

考题 有以下说明和定义语句struct student{ int age; char num[8];};struct student stu[3]={{20,"200401"},{21,"200402"},{10\9,"200403"}};struct student *p=stu;以下选项中引用结构体变量成员的表达式错误的是A.(p++)-num B.p-num C.(*p).num D.stu[3].age

考题 有以下说明和定义语句:struct student{int age; char num[8] ;};struct student stu [3] = { { 20, "200401" } , {21, "200402" } , {19, "200403" } };stract student * p = stu;以下选项中引用结构体变量成员的表达错误的是( )。A.(p++) ->numB.p- >numC.( *p).numD.stu[3].age

考题 有以下程序: #includestdio.h struct stu { int num; char name[10]: int age;} void fun(struct stu*p) {printf("%s\n",(*p).name);} the main { struct stu students[3]={{9801,"Zhang".20}, {9802,"Wang",19},{9803,"Zhao",1 8}} fun(students+2); } 输出的结果是( )。A. ZhangB.ZhaoC.WangD.18

考题 以下程序的输出结果是______。includestruct stu{int num; char name[10]; int age;};v 以下程序的输出结果是______。#include<stdio.h>struct stu{ int num; char name[10]; int age;};void fun(struct stu*p){ printf("%s\n",(*p).name);}main(){ struct stu students[3]={ {9801,"Zhang",20}, { 9802,"Wang",19}, { 9803,"Zhao",18} }; fun(students+2);}A.ZhangB.ZhaoC.WangD.18

考题 下列关于结构型变量的定义语句中,错误的是( )A.typedef struct CCCB.define GGG struct { char name[20];GGG CCC { char name[20]; int age; int age; }GGG; }; GGG abc ; GGG CCC abc;C.structD.struct { char name[20]; { char name[20]; int age; int age; }ccc; }abc; CCC abc;

考题 下列对结构及其变量定义错误的是( )。A.struct My Struct { int num; char ch; }B.struct MyStruct { int num; char ch; }My;C.strut { int num; char ch; }My;D.struct { int num; char ch; };

考题 若有以下说明和语句: struct student{          int age;          int num;  }std, *p;  p=std;  则下面对该结构体变量std中成员age的引用方式错误的是()。 A、std.ageB、*p.ageC、(*p).ageD、p-age

考题 有下列语句:  struct Birthday{public int year;  public int month;   public int day;}; struct Student{ int no;  string name;   int age;  public Birthday bir; };  ……  Student Stu;  如果要把Stu的出生年份赋值为1988,正确的语句是()A、 Stu.bir.year=1988;B、 Stu.year=1988;C、 Stu. Birthday.year=1988;D、 Student. Birthday.year=1988;

考题 数据结构里,struct student { char name[20]; char sex[10]; int age; int score; }; 定义结构体后,定义变量、数组赋值正确的是()。A、struct student s={"张三","男",18,100};B、struct student stu[3]={{"张三","男",18,100},{"李四","男",19,90},{"王五","男",23,97}};C、struct student s={"李四";"女";18;100};D、struct student stu[3]={{"张三",18,"男",100},{"李四",19,"男",90},{"王五",23,"男",97}};

考题 有以下说明语句:struct Student{int num;double score;};Student stu[3]={{1001,80},{1002,75},{1003,91}},*p=stu;则下面引用形式错误的是()A、p-numB、(p++).numC、(p++)-numD、(*p).num

考题 单选题若有以下说明和语句: struct student{          int age;          int num;  }std, *p;  p=std;  则下面对该结构体变量std中成员age的引用方式错误的是()。A std.ageB *p.ageC (*p).ageD p-age

考题 单选题有以下说明语句:struct Student{int num;double score;};Student stu[3]={{1001,80},{1002,75},{1003,91}},*p=stu;则下面引用形式错误的是()A p-numB (p++).numC (p++)-numD (*p).num

考题 单选题有以下函数:#include struct stu{ int num; char name[10]; int age;};void fun(struct stu *p){ printf(%s, p-name);}main(){ struct stu x[3] = {{01,Zhang,20}, {02,Wang,19}, {03,Zhao,18}}; fun(x+2);}程序运行后的输出结果是(  )。A ZhangB ZhaoC WangD 19

考题 单选题以下scanf函数调用语句中对结构体变量成员的不正确引用的是()。  struct node{      char name[20];      int age;      int sex; }student[5],*p;  p=student;A scanf(“%s”,student[0].name);B scanf(“%d”,student[0].age);C scanf(“%d”,(p-sex));D scanf(“%d”,p-age);

考题 多选题数据结构里,struct student { char name[20]; char sex[10]; int age; int score; }; 定义结构体后,定义变量、数组赋值正确的是()。Astruct student s={张三,男,18,100};Bstruct student stu[3]={{张三,男,18,100},{李四,男,19,90},{王五,男,23,97}};Cstruct student s={李四;女;18;100};Dstruct student stu[3]={{张三,18,男,100},{李四,19,男,90},{王五,23,男,97}};