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

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

若有以下说明和语句,则以下引用方式中不正确的是()。 struct worker { int no; char *name; }work, *p=&work;

A.work.no

B.(*p).no

C.p->no

D.work->no


参考答案和解析
D解析:?的优先级远高于'&'和'*'。
更多 “若有以下说明和语句,则以下引用方式中不正确的是()。 struct worker { int no; char *name; }work, *p=work;A.work.noB.(*p).noC.p->noD.work->no” 相关考题
考题 有以下结构体说明、变量定义和赋值语句struct STD{ char name[10];int age;char sex;} s[5],*ps;ps=s[0];则以下 scanf 函数调用语句中错误引用结构体变量成员的是A)scanf("%s",s[0].name);B)scanf("%d",s[0].age);C)scanf("%c",(ps-sex));D)scanf("%d",ps-age);

考题 ( 38 )有以下定义和语句struct workers{ int num;char name[20];char c;struct{ int day; int month; int year; } s;} ;struct workers w,*pw;pw = w;能给 w 中 year 成员赋 1980 的语句是A ) *pw.year = 198O;B ) w.year=1980;C ) pw-year=1980;D ) w.s.year=1980;

考题 若有以下说明和语句:sturct st { int n;char *ch;}; struct st a[3]={5, "abc",7, "def",9, "ghk"},*p=a;则值为6的表达式是( )。A)p++-n B)p-n++C)(*p).n++ D)++p-n

考题 有以下说明和定义语句 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);

考题 若有下列说明和语句,则对结构体变量st中成员i的引用方式不正确的是( )。Stmct stu{ int i;int name;}st,*p;p=st;A.st.iB.*p.iC.(*p).iD.p->i

考题 若有下列说明和语句,则对结构体变量st中成员i的引用方式不正确的是( )。Struct stu{inti;intname;}st,*#p;p=St;A.st.iB.*p.iC.(*p).iD.p->i

考题 若有以下定义的语句: 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.

考题 有以下程序: include struct STU (char name[10]; int num; }; 有以下程序: #include <string.h> struct STU (char name[10]; int num; }; void f(char *name, int num) {struct STU s[2]={{"SunDan",20044}.{"Penghua",20045}}; num=s[0].num; strcpy(name,s[0].name); } main() {struct STU s[2]={{"YangSall",20041},{"LiSiGao",20042}},*p;p=s[1]; f(p->name,p->num); printf("%s%d\n",p->name,p->num); } 程序运行后的输出结果是 ______。A.SunDan 20042B.SunDan 20044C.LiSiGuo 20042D.YangSan 20041

考题 有以下定义和语句: struct students {int num;char name[20];char c; struct {int grade1;int grade2;}s; }; struct students w,*pw; *pw=w; 下列赋值语句不正确的是( )。A.w.num=1002;B.w.grade1=85;C.pw->num=1002;D.w.s.grade2=85;

考题 若有以下说明和语句: struct st{int n;char*ch;} struct st a[3]={5,"abc"7,"def",9",ghk"),*p=a; 则值为6的表达式是______。A.p++->nB.p->n++C.(*p).n++D.#NAME?

考题 若有以下说明和语句: struct st{int n;char * ch;}; struct st a[3]={5,"abc",7,"def",9,"ghk"},*p=a; 则值为6的表达式是 ______。A.p++->nB.p->n++C.(*p).n++D.++p->n

考题 若定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。 struct st { int x; int y; int z; } struct worker { char name[20]; char sex; struct st birth; }p;A.x=1987B.birth.x=1987;C.p.birth.x=1987;D.p.x=1987;

考题 设定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。Struct st{ int x;inty;int z;}Struct worker{ char name[20];char sex;struct st birth;}p;A.x=1987B.birth.x=1987;C.p.birth.x=1987;D.p.x=1987;

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

考题 若有下列说明和语句,则对结构体变量st中成员i的引用方式不正确的是( )。 Struct stu { int i; int name; }st,*p; p=st;A.st.iB.*p.iC.(*p).iD.p->i

考题 若有以下结构类型说明和变量定义,则变量a在内存中所占字节数是struct stud{ char num[6]; int s[4]; double ave;}a,*p;

考题 设定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。 stmct st { int x; int y; int z; } struct worker { char name[20]; char sex; struct st birth; }p;A.x=1987B.birth.x=1987;C.p.birth.x=1987;D.p.x=1987;

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

考题 以下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);

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

考题 有以下说明语句:struct Worker{int no;char name[20];};Worker w,*p=w;则下列错误的引用是()A、w.noB、p-noC、(*p).noD、*p.no

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

考题 单选题若有以下定义:struct tt{char name[10];char sex;} aa={aaaa,'F'},*p=aa;则错误的语句是(  )。A scanf(%c,aa.sex);B aa.sex=getchar();C printf(%c,(*p).sex);D printf(%c,p-sex);

考题 单选题以下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 Worker{int no;char name[20];};Worker w,*p=w;则下列错误的引用是()A w.noB p-noC (*p).noD *p.no