#include <stdio.h>
struct stu
{ int num; char name [10];int age;};
Void fun(struct stu *p)
{ printf("%s\n,p->name);}
main( )
{ struct stu x[3]={ {01,”Zhang”,20},{02, ” Wang”,19},{03, ”zhao”,18} };
fun(x+2);
}
程序运行后的输出结果是
A.)Zhang
B.)Zhao
C.)Wang
D.)19
[单选题]有以下程序#include <stdio.h>main(){struct STU { char 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.)Qia
[单选题]有以下程序#include <stdio.h>struct tt{ int x;struct tt *y;} *p;struct tt a[4]={20,a+1,15,a+2,30,a+3,17,a};main(){ int i;p=a;for(i=1;i<=2;i++) {printf("%d,",p->x); p=p->y;}}程序的运行结果是A.)20,30,B.)30,17C.)15,30,D.)20,15,
[单选题]有以下程序#include <stdio.h>struct st{ int x,y;} data[2]={1,10,2,20};main(){ struct st *p=data;printf("%d,",p->y); printf("%d/n",(++p)->x);}程序的运行结果是A.)10,1B.)20,1C.)10,2D.)20,2
[单选题]有以下程序#include <stdio.h>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);}程序的运行结果是A.)1,2B.)2,3C.)3,4D.)4,1
[单选题]有以下程序#include <stdio.h>struct st{ int x, y, z;} data[2]={3,10,2,20,15,7};main(){ struct st *p=data; printf("%d,", p->y); printf("%d/n",(++p)->x); }程序的运行结果是A.10,3 B.20,3 C.10,20 D.20,2
[单选题](38)有以下程序#include <stdio.h>struct S{ int a,b;}data[2]={10,100,20,200};main(){ struct S p=data[1];printf("%d/n",++(p.a));}程序运行后的输出结果是A.)10B.)11C.)20D.)21
[单选题]有以下程序#include<stdio.h>struct S{int a,b;} data[2]={10,100,20,200};main(){struet S p=data[l];printf(“%d\n”,++(P.a)):}程序运行后的输出结果是A.10B.11C.20D.21
[单选题]有以下程序#include<stdio.h>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));}程序运行后的输出结果是A.1,2B.4,1C.3,4D.2.3
[单选题]34 ) 有以下程序#include <stdio.h>int f(int n);main(){ int a=3,s;s=f(a);s=s+f(a);printf("%d/n",s);}int f(int n){ static int a=1;n+=a++;return n;}程序运行以后的输出结果是A.)7B.)8C.)9D.)10
[单选题]有以下程序#include <stdio.h>main( ){ int n,*p=NULL;*p=&n;printf("Input n:"); scanf("%d",&p); printf("output n:"); printf("%d/n",p);}该程序试图通过指针 p 为变量 n 读入数据并输出,但程序有多处错误,以下语句正确的是A.)int n,*p=NULL;B.)*p=&n;C.)scanf("%d",&p)D.)pr