下列程序的运行结果为:。#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是()。
函数findbook的功能是:在有n个元素的数组s中查找名为a的书,若找到,函数返回数组下标,否则,函数返回-1,请填空。structdata{intid;charname[20];doubleprice;}book[100];intfindbook(structdatas[],intn,chara[]){inti;for(i=0;i
对下列结构体类型变量m中的成员x的三种引用方式为: 、和。struct student{ int x ;float y ;} m,*p=&m;
下列程序运行时若输入:3 101 wang 102 huang 103 liu,则其运行结果为:#include#includestructworker{intnum;charname[20];};intmain(void){structworkerper[10],t;intn,i,j;scanf("%d",&n);for(i=0;i0){t=per[j];per[j]=per[j+1];per[j+1]=t;}for(i=0;i