单项选择题

有以下程序
#include<stdio.h>
#include<stdlib.h>
main()
int*a,*b,*c;
a=b=c=(int*)malloc(sizeof(int));
*a=1;*b=2,*c=3;
a=b;
printf("%d,%d,%d\n",*a,*b,*c);

程序运行后的输出结果是______。

A.3,3,3
B.2,2,3
C.1,2,3
D.1,1,3
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序 #include<stdio.h> #include<stdlib.h> void fun(int*p1,int*p2,int*s) s=(int*)malloe(sizeof(int)); *s=*p1+*(p2++); main() int a[2]=1,2,b[2]=10,20,*s=a; fun(a,b,s);printf( %d n ,*s); 程序运行后的输出结果是______。
A.1
B.10
C.11
D.2
单项选择题
若有以下程序 #include<stdio.h> typedef struct stu char name[10],gender; int score; STU; void f(STU a,STU b) b=a; printf( %s,%c,%d, ,b.name,b.gender,b.score); main() STU a= Zhao ,’m’,290,b= Qian ,’f’,350; f(a,b); printf( %s,%c,%d n ,b.name,b.gender,b.score; 则程序的输出结果是______。
A.Zhao,m,290,Qian,f,350
B.Zhao,m,290,Zhao,m,290
C.Qian,f,350,Qian,f,350
D.Zhao,m,290,Zhao,f,350
相关试题
  • 有以下程序 #include<stdio.h> main...
  • 有以下程序 #include<stdio.h> main...
  • 有以下程序 #include<stdio.h> main...
  • 有以下程序 #include<stdio.h> main...
  • 以下程序依次把从终端输入的字符存放到f文...