以下程序用来输出结构体变量stu所占存储单元的字节数。structstudent{intnum;charname[20];floatscore;}stu;intmain(void){printf("stusize:%d\n",sizeof());}
查看答案
若有以下定义:structperson{charname[9];intage;};structpersonc[10]={{"John",17},{"Paul",19},{"Mary",18},{"Adam",16}};则语句“printf("%s",c[3].name);”的输出是。
若有以下程序段,则语句“printf("%d\n",sizeof(test));”的输出是。typedefstruct{longa[2];intb[4];charc[8];}ABC;ABCtest;
下列程序的运行结果为:。#includeintmain(void){structcmplx{intx;inty;}cnum[2]={1,3,2,7};printf("%d\n",cnum[0].y/cnum[0].x*cnum[1].y);return0;}
设有以下说明语句:struct stu{ int a;float b;}stutype;则struct是()、struct stu是()、stutype是()、a和b是()。