网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
若已定义 struct num{ int a; int b; float f; } n={1,3,5.0}; struct num *p=&n; 则表达式p->b/n.a*++p->b的值是 ① ,表达式(*p).a+p->f的值是 ② 。
参考答案
更多 “ 若已定义 struct num{ int a; int b; float f; } n={1,3,5.0}; struct num *p=n; 则表达式p-b/n.a*++p-b的值是 ① ,表达式(*p).a+p-f的值是 ② 。” 相关考题
考题
设有以下语句typedef struct TT{char c,int a[4];} CIN;则下面叙述中正确的是A) 可以用 TT 定义结构体变量B)TT 是 struct 类型的变量C) 可以用 CIN 定义结构体变量D)CIN 是 struct TT 类型的变量
考题
以下对结构体类型变量的定义中,不正确的是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;
考题
下面结构体的定义语句中,错误的是A)struct ord {int x;int y;int z;}; struct ord a;B)struct ord {int x;int y;int z;} struct ord a;C)struct ord {int x;int y;int z;} a;D)struct {int x;int y;int z;} a;
考题
设有以下语句 typedef struct TT {char c; int a[4];}CIN; 则下面叙述中正确的是______。A.可以用TT定义结构体变量B.TT是struct类型的变量C.可以用CIN定义结构体变量D.CIN是struct TT类型的变量
考题
下面结构体的定义语句中,错误的是( )。A.struct ord{int x;int y;int z;};struct ord a;B.struct ord{int x;int y;int z;};ord a;C.struct ord{int x;int y;int z;}a;D.struct{int x;int y;int z;}a;
考题
现有如下定义:struct aa{int a;float b;char c;}*p;现需用malloc函数动态的申请一个struct aa类型大小的空间(由p指向),则定义的语句为: 【17】 。
考题
下面结构体的定义语句中,错误的是( )。 A.struct ord{int x;int Y;int Z;};struet ord a;SXB
下面结构体的定义语句中,错误的是( )。A.struct ord{int x;int Y;int Z;};struet ord a;B.struct ord{int x;int y;int Z;}struct ord a;C.struct ord{int X;int Y;int Z;}a;D.struct{int X;int y;int Z;}a;
考题
下列对结构及其变量定义错误的是( )。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; };
考题
若有以下结构体定义,则______是正确的引用或定义。 struct example { int x; int y; }v1;A.example.x=10B.example v2.x=10C.struct v2;v2.x=10D.struct example v2={10};
考题
以下对结构体类型变量的定义中,不正确的是( )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;
考题
若定义下列结构体,结构体变量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;
考题
若程序中有以下说明和定义。struct abc{ int x;char y;}struct abc s1,s2;则会发生的情况是A.编译时出错 B.程序将顺序编译、连接、执行C.能顺序通过编译、连接,但不能执行 D.能顺序通过编译,但连接出错
考题
下面结构体的定义语句中,错误的是( )。A.struct ord{int x;int Y;int z;}struct ord a;B.struct ord{int x;im Y;im z;};struct ord a;C.struct ord{int x;int Y;int Z;}a;D.struct{int x;int Y;int z;}a;
考题
某C语言结构体的定义如下。 struct date { int year, month, day; }; struct worklist { char name[20]; char sex; struct date birthday; }person; 若对变量person的出生年份进行赋值,正确的赋值语句是(33)。A.year=1976B.birthday. year=1976C.person. year=1976D.person. birthday. year=1976
考题
下列对结构及其变量定义错误的是( )。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; };
考题
以下对结构体类型变量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;
考题
数据结构里,定义名称为plan结构体,其有5个元素的结构体数组的定义方式是()。A、struct plan数组名[5];B、struct plan数组名[10];C、plan struct数组名[5];D、plan数组名[5];
考题
已知product是结构体类型,定义含有十个元素是该类型的数组不正确的是()。A、struct producta[10];B、struct producta{10};C、struct producta10;D、struct producta(10);
考题
问答题若已定义 struct num{ int a; int b; float f; } n={1,3,5.0}; struct num *p=n; 则表达式p-b/n.a*++p-b的值是 ① ,表达式(*p).a+p-f的值是 ② 。
考题
单选题有如下定义:struct st{ int a; float b;}x[10];FILE *fp;若文件已正确打开,且数组x的10个元素均已赋值,以下将数组元素写到文件中的语句错误的是( )。A
for(i=0; i10; i++) fwrite(x,sizeof(struct st), 1,fp);B
fwrite(x,10*sizeof(struct st), 1,fp);C
fwrite(x,sizeof(struct st), 10,fp);D
for(i=0; i10; i++) fwrite(x[i],sizeof(struct st), 1,fp);
考题
单选题若有以下程序:
typedef struct S
{int g;char h;}T;
以下叙述中正确的是( )。A
可用S定义结构体变量B
可用T定义结构体变量C
S是struct类型的变量D
T是struct S类型的变量
热门标签
最新试卷