以下对结构变量stu1中成员age的非法引用是(). struct student { int age; int num; }stu1,*p; p=stu1;A.stu1.ageB.student.ageC.p->ageD.(*p).age

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

A.stu1.age

B.student.age

C.p->age

D.(*p).age


参考答案和解析
见题中对应选项B

相关考题:

有以下说明和定义语句 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.

以下scanf函数调用语句中对结构体变量成员的引用不正确的是struct pupil{ char name[20];int ageint sex;} pup[5],*p;p=pup;A.scanf("%s",pup[0].name);B.scanf("%d",pup[0].age);C.scanf("%dT",(p-sex));D.scanf("%d",p-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.结构体可以嵌套定义

C数组名称是指针变量吗? 看这段程序,可是执行。#include stdio.hint main(int argc, char *argv[]){ struct info { char name[33]; int age; }; struct info aa[3]={"meng",20,"juan",29,"an",59}; struct info *p=aa; for(int i=0;i3;i++,p++) printf("%-6s %d\n",p-name,p-age);}将其改成这样:#include stdio.hint main(int argc, char *argv[]){ struct info { char name[33]; int age; }; struct info aa[3]={"meng",20,"juan",29,"an",59}; //struct info *p=aa; for(int i=0;i3;i++,aa++) printf("%-6s %d\n",aa-name,aa-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

已知stu1和stu2是Student类的两个对象,则执行“stu1>stu2”时会自动执行Student类的()方法。 A.__lt__B.__le__C.__gt__D.__ge__

若有以下定义的语句: 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.结构体可以嵌套定义

以下对结构体变量mix中成员x的正确引用是______。 struct { int t;int x; }mix,*p; p=mix;A.(*p).mix.xB.(*p).xC.p->mix.xD.p.mix.x

若有结构体定义: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;

有以下程序#include stdio.hstruct stu{ int num; char name [10];int age;};Void fun(struct stu *p){ printf("%s\n,p-name);}main( ){ struct stu x[3]={ {01,”Zhang”,20},{02, ” Wang”,19},{03, ”zhao”,18} };fun(x+2);}程序运行后的输出结果是A)ZhangB)ZhaoC)WangD)19

有如下说明和定义语句: 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

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

以下程序的输出结果是______。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

以下scanf函数调用语句中对结构体变量成员的不正确引用是 struct pupil { char name[20]; int age int sex; } pup[5],*p; p=pup;A.scanf("%s",pup[0].name);B.scanf("%d",pup[0].age);C.scanf("%dT",(p->sex));D.scanf("%d",p->age);

下列关于结构型变量的定义语句中,错误的是( )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 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的引用方式错误的是()。Astd.ageB*p.ageC(*p).ageDp-age

单选题有以下函数:#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);}程序运行后的输出结果是(  )。AZhangBZhaoCWangD19

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