单项选择题

有以下定义和语句
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.w.s.year=1980;
B.w.year=1980;
C.pw->year=-1980;
D.*pw.year=1980;
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序 #include<stdio.h> main() struct STUchar name[9];char sex;double score[2];; struct STU a= Zhao ,’m’,85.0,90.0,b= Qian ,’f’,95.0,92.0; b=a; printf( %s,%c,%2.0f,%2.0f n ,b.name,b.sex,b.score[0],b.score[1]); 程序的运行结果是______。
A.Zhao,m,85,90
B.Qian,m,85,90
C.Zhao,f,95,92
D.Qian,f,95,92
单项选择题
有以下程序 #include<stdio.h> typedef structint b,p;A; void f(A c) *注意:c是结构变量名* int j; c.b+=1;c.p+=2; main() int i; A a=1,2; f(a); printf( %d,%d n ,a.b,a.p); 程序运行后的输出结果是______。
A.1,2
B.2,4
C.1,4
D.2,3
相关试题
  • 有以下程序 #include<stdio.h> main...
  • 有以下程序 #include<stdio.h> main...
  • 有以下程序 #include<stdio.h> main...
  • 有以下程序 #include<stdio.h> main...
  • 以下程序依次把从终端输入的字符存放到f文...