以下程序的运行结果是____ 。#include struct node{int x;char c;};void func(struct node b);main(){static struct node a={10,'x'};func(a);printf("%d,%c\n",a.x,a.c);}void func(struct node b){b.x=20;b.c='x';}
A. 20,x
B. 10,x
C. x,10
D. x,20
查看答案
以下程序的运行结果是______。#include main(){struct s{int n;int *m;} *p;int d[5]={10,20,30,40,50};struct s arr[5]={100,&d[0],200,&d[1],300,&d[2],400, &d[3],500,&d[4]};p=arr;printf("%d,",++p->n);printf("%d,",(++p)->n);printf("%d\n",++(*p->m));}
A. 100,200,20
B. 100,201,21
C. 101,201,21
D. 100,200,21
以下程序的运行结果是______。#include main(){int j;union{short int a;long b;unsigned char c;} m;m.b=0x12345678;printf("%x,",m.a);printf("%x\n",m.c);}
以下程序的运行结果是______ 。#include main(){struct person{char name[9];int age;};static struct person st[10]={"John",17,"Paul",19,"Mary",18,"Smith",16};printf("%c\n",st[2].name[0]);}
以下程序的运行结果是________、___________、________、_________。#include #define P printf#define C2 "%c""%c""\n"#define S2 "%s""%s""\n"main(){static struct st{char c[5];char *s;} s1={"cake","milk"};static struct t{char *str;struct st ss1;} s2={"work",{"time","free"}};P(C2,s1.c[0],*s1.s);P(S2,s1.c,s1.s);P(S2,s2.str,s2.ss1.s);P(S2,++s2.str,s2.ss1.s+2);}