笔果题库
计算机二级C语言程序设计
VIP题库
搜题找答案,就上笔果题库
若有下面的说明和定义:struct test{ int ml;char m2;float m3;union uu{ char u1[5];int u2[2];} ua;} myaa;则sizeof(struct test)的值是______。
搜题找答案,就上笔果题库
有以下程序段struct st{int x;int *y;}*pt;int a[]={1,2},b[]={3,4};struct st c[2]={10,a,20,b};pt=c;以下选项中表达式的值为11的是______。
搜题找答案,就上笔果题库
有以下程序#include main(){ struct cm{ int x; int y; } a[2]={4,3,2,1 };printf("%d \n", a[0].y/a[0].x*a[1].x );}程序运行后的输出结果是______。
搜题找答案,就上笔果题库
若有以下程序段struct st{ int n;struct st *next; };struct st a[3]={ 5,&a[1],7,&a[2],9,''\0'' }, *p;p=&a[0];则以下选项中值为6的表达式是______。
搜题找答案,就上笔果题库
以下程序的输出结果是______。#include typedef struct{ char nm[10]; int suc;}STU;main(){ STU stu[3]={"wang",87,"liu",93,"zhao",89}; if(stu[0].suc>stu[1].suc) stu[0].suc>stu[2].suc ? printf("%s:%d\n",stu[0].nm,stu[0].suc): printf("%s:%d\n",stu[0].nm,stu[0].suc); else stu[1].suc>stu[2].suc ? printf("%s:%d\n",stu[1].nm,stu[1].suc): printf("%s:%d\n",stu[2].nm,stu[2].suc);}
搜题找答案,就上笔果题库
有以下程序struct STU{ char name[10];int num;int Score;};main(){ struct STU s[5]={{"YangSan",20041,703},{"LiSiGuo",20042,580},{"WangYin",20043,680},{"SunDan",20044,550},{"Penghua",20045,537}}, *p[5],*t;int i,j;for(i=0;iScore){t=p[i];p[i]=p[j];p[j]=t;}printf("%d %d\n",s[1].Score,p[1]->Score);}执行后输出结果是______。
搜题找答案,就上笔果题库
有以下程序#include struct ord{int x,y;} dt[2]={1,2,3,4};main(){ struct ord *p=dt;printf("%d,",++p->x);printf("%d\n",++p->y);}程序的运行结果是______。
搜题找答案,就上笔果题库
设有如下定义:struct sk{int a;float b;}data;int *p;若要使p指向data中的a域,正确的赋值语句是______。
搜题找答案,就上笔果题库
有以下程序#include main(){ struct node{int n; struct node *next;} *p;struct node x[3]={{2,x+1},{4, x+2},{6, NULL}};p=x;printf("%d,",p->n );printf("%d\n",p->next->n );}程序运行后的输出结果是______。
搜题找答案,就上笔果题库
有以下程序struct S{int n; int a[20];};void f(int *a, int n){ int i;for(i=0;i