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

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

已知学生记录描述如下:下面对结构体成员"computer"的赋值方式正确是()。 struct student { int num; char name[8]; struct { float math; float engl; float computer; } mark; } std;

A.student.computer=84;

B.mark.computer =84;

C.std.mark.computer=84;

D.std.computer=84;


参考答案和解析
B
更多 “已知学生记录描述如下:下面对结构体成员"computer"的赋值方式正确是()。 struct student { int num; char name[8]; struct { float math; float engl; float computer; } mark; } std;A.student.computer=84;B.mark.computer =84;C.std.mark.computer=84;D.std.computer=84;” 相关考题
考题 以下对结构体类型变量的定义中,不正确的是A.typedef struct aa{ int n;float m;}AA;AA tdl;B.#define AA struct aaAA{ int n;float m;} tdl;C.struct{ int n;float m;} aa;struct aa tdl;D.struct{ int n;float m;} tdl;

考题 设有以下说明语句struct ex{ int x ; float y; char z ;} example;则下面的叙述中不正确的是A.struct结构体类型的关键字B.example是结构体类型名C.x,y,z都是结构体成员名D.struct ex是结构体类型名

考题 设有定义"struct {int a; float b; char c;} abc, *p_abc=abc;",则对结构体成员a的引用方法可以是abc.a和p_abc【20】a。

考题 设有以下程序段:struct MP3{ char name[20];char color;float price;}std,*ptr;ptr=std:若要引用结构体变量std中的color成员,写法错误的是( )。A.std.colorB.ptr->colorC.std->colorD.(*ptr)color

考题 下列语句段中,正确的是( )。A.struct{int x;float y;int a[2];unsigned b[3];char name[10];};B.struct stu{unsigned a[3];unsigned b[4];}x;int*p=x.a;C.struct stu{int a;float x[4];}y={1,1.0};float data=y.x;D.struct nd{int a,b;unsigned c[2]=5;};

考题 设有以下说明语句 struct num { int a; float b; }numl;则下面的叙述不正确的是______。A.struct是结构体类型的关键字B.struct num是用户定义的结构体类型C.numl是用户定义的结构体类型名D.a和b都是结构体成员名

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

考题 以下对结构体类型变量的定义中,不正确的是______。A.typedef struct aa { int n; float m; }AA; AA td1;B.#define AA struct aa AA {int n; float m; }td1;C.struct {int n; float m; }aa; srtuct aa td1:D.struct {int n; float m; }tdl;

考题 若某C语句如下: struct ex {int x;float y;char z;}example; 则以下叙述中不正确的是(29)。A.struct结构体类型的关键字B.x,y,z都是结构体成员名C.stmct ex是结构体类型D.example是结构体类型名

考题 若有如下程序段: struct student { int num;float score; } stu[3]={{10,85},{60,58},{32,23}}; main() { struct student*t; t=stu; } 则下面表达式中值为58的是( )。A.(*t).numB.*(t++)->numC.(*++t)scoreD.(++t)->score

考题 设有定义“struct {int a; float b; char c;} abc, *p_abc=abc;”,则对结构体成员a的引用方法可以是abc.a和p_abca。

考题 以下对结构体类型变量的定义中,不正确的是( )A.typedef struct aa { int n; float m; }AA; AA tdl;B.#define AA struct aa AA{ int n; float m; }tdl;C.struct { int n; float m; }aa; struct aa tdl;D.struct { int n; float m, }tdl;

考题 以下程序的输出结果是【】。 include main() {struct stru {int a; float b; char d[4]; } 以下程序的输出结果是【 】。include<stdio.h>main(){ struct stru{ int a;float b;char d[4];};printf("%d\n",sizeof(struct stru));}

考题 以下对结构体类型变量td的定义中,错误的是 ______。A.typedef struct aaB.struct aa {int n; {int n; float m; float m; }AA; }td; AAtd; struct aa td;C.structD.struct {int n; {int n; float m; float m; }aa; }td; struct aa td;

考题 以下对结构体类型变量的定义中,不正确的是_______。A.typedef struct aa { int n; float m; }aa; aa td1;B.#define aa struct aa aa{ int n; float m; }td1;C.struct { int n; float m; }aa; struct aa td1;D.struct { int n; float m; }td1;

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

考题 以下对结构体类型变量td的定义中,错误的是A.typedef struct aa { int n; float m; }AA; AA td;B.stmct aa{ int n;float m;}td;stmct aa td;C.struct { int n; float m; }aa; struct aa rd;D.struct{ int n;float m;}td;

考题 设有以下程序段: struct MP3 { char name[20]; char color; float price; }std,*ptr; ptr=std: 若要引用结构体变量std中的color成员,写法错误的是( )。A.std.colorB.ptr-colorC.std-colorD.(*ptr)color

考题 下列语句段中,正确的是( )。A.street { int x; float y; int a[2]; unsigned b[3]; char name[ 10]; };B.struct stu { unsigned a[3]; unsigned b[4]; }x; int *p= x.a;C.stmct stu { int a; float x[4]; }y={1,1.0}; float data=y.x;D.struct nd { int a,b; unsigned c[2]=5; };

考题 有以下程序 include struct STU { char num[10]; float score[3];}; void ma 有以下程序 #include<iostream.h> struct STU { char num[10]; float score[3];}; void main( ) { struct STU s[3]={ { "20021",90,95,85 }, {"20022",95,80,75 }, {"20023",100,95,90 } },* p=s; int i; float sum=0; for(i=0;i<A.260B.270C.280D.285

考题 下列语句段中,正确的是( )。A.struct { int x; float y; int a[2]; unsigned b[3]; char name[ 10]; };B.struct stu { unsigned a[3]; unsigned b[4]; }x; int *p= x.a;C.street stu { int a; float x[4]; }y={1,1.0}; float data=y.x;D.struct nd {int a,b; unsigned c[2]=5; };

考题 以下对结构体类型变量td的定义中,错误的是( )。A.typcdef struct aa { int n; float m; } AA; AA td;B.struct aa {int n; float m; } struct aa td;C.struct {int n; float m; } aa; struct aa td;D.struct {int n; float m; }td;

考题 以下对结构体类型变量td的定义中,错误的是( )。A.typedef struct aa { int n; float m; }AA; AA td;B.struct aa { int n; float m; }td; stmct aa td;C.stmct { int n; float m; }aa; stmct aa td;D.struct { int n; float m; }td;

考题 若有定义和语句:struct student { int num; char name[10]; float score;} s[5]={{1,"lili",98.5},{9,"xiaohua",66}},*p=s;printf("%d",*p++);输出结果是1。( )此题为判断题(对,错)。

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

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

考题 单选题设有以下程序段:struct MP3{ char name[20]; char color; float price;}std,*ptr;ptr=std;要引用结构体变量std中的color成员,下列写法中错误的是(  )。A std.colorB ptr-colorC std-colorD (*ptr).color

考题 问答题给定程序通过定义并赋初值的方式,利用结构体变量存储了一名学生的学号、姓名和3门课的成绩。函数fun的功能是将该学生的各科成绩都乘以一个系数a。  请在程序的下画线处填入正确的内容并把下画线删除,使程序得出正确的结果。  注意:部分源程序给出如下。  不得增行或删行,也不得更改程序的结构!  试题程序:#include #include typedef struct{ int num; char name[9]; float score[3];} STU;void show(STU tt){ int i; printf(%d %s:,tt.num,tt.name); for(i=0; i3; i++) printf(%5.1f,tt.score[i]); printf();}/*********found*********/void modify(①______ *ss,float a){ int i; for(i=0; i3; i++)  /*********found*********/  ss-②______*=a;}main(){ STU std={1,Zhang,76.5,78.0,82.0}; float a; printf(The original number and name and scores:); show(std); printf(Input a number:); scanf(%f,a); /*********found*********/ modify(③______,a); printf(A result of modifying:); show(std);}