[单选题]

设定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。

Struct st

{ int x;

inty;

int z;

}

Struct worker

{ char name[20];

char sex;

struct st birth;

}p;

A.x=1987

B.birth.x=1987;

C.p.birth.x=1987;

D.p.x=1987;

参考答案与解析:

相关试题

设定义下列结构体,结构体变量p的出生年份赋值正确的语句是()。struct st

[单选题]设定义下列结构体,结构体变量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

    [单选题]若定义下列结构体,结构体变量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的出生年份赋值正确的语句是()。stmct st{

    [单选题]设定义下列结构体,结构体变量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 STD{ char name[

    [单选题]有以下结构体说明、变量定义和赋值语句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);

  • 查看答案
  • 有以下结构体说明、变量定义和赋值语句 struct STD { char nam

    [单选题]有以下结构体说明、变量定义和赋值语句 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);

  • 查看答案
  • 有以下结构体说明,变量定义和赋值语句:struct STD{char name[

    [单选题]有以下结构体说明,变量定义和赋值语句: struct STD {char name[10]; int age; char ***; }s[5],*ps; ps=&s[0]; 则以下scanf函数调用语句中错误的结构体变量成员是( )。A.scanf("%s",s[0].name);B.scanf("%d",&s[0].age);C.scanf("%c",&(ps->***));D.scanf("%d",ps->age);

  • 查看答案
  • 有以下结构体说明、变量定义和赋值语句 struct STD { char nam

    [单选题]有以下结构体说明、变量定义和赋值语句 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);

  • 查看答案
  • 以下结构体类型说明和变量定义中正确的是A)typedef struct{int

    [单选题]以下结构体类型说明和变量定义中正确的是A.)typedef struct{int n; char c;} REC;REC t1,t2;B.)struct REC;{int n; char c;};REC t1,t2;C.)typedef struct REC ;{int n=0; char c='A';} t1,t2D.)struct{int n;char c;}REC;REC t1,t2;

  • 查看答案
  • 已知函数的原形如下,其中结构体a为已经定义过的结构,且有下列变量定义struct

    [单选题]已知函数的原形如下,其中结构体a为已经定义过的结构,且有下列变量定义 struct a*f(int t1,int*t2,strcut a t3,struct a*t4) struct a p,*p1;int i; 则正确的函数调用语句为A.&p=f(10,&i,p,p1);B.p1=f(i++,(int*)p1,p,&p);C.p=f(i+1,&(i+2),*p,p);D.f(i+1,&i,p,p);

  • 查看答案
  • 下面结构体的定义语句中,错误的是A)struct ord {int x;int

    [单选题]下面结构体的定义语句中,错误的是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;

  • 查看答案
  • 设定义下列结构体,结构体变量p的出生年份赋值正确的语句是()。 Struct s