单项选择题
有以下程序
#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> void fun(int p) int d=2; p=d++; printf( %d ,p); main() int a=1; fun(a);printf( %d n ,a); 程序运行后的输出结果是
A) 32
B) 12
C) 21
D) 22
点击查看答案&解析
单项选择题
有以下程序: #include <stdio.h> #include <string.h> void fun( char *s[], int n) char *t; int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strlen(s[i])>strlen(s[j])) t=s[i];s[i]=s[j];s[j]=t; main() char *ss[]= bcc , bbcc , xy , aaaacc , aabcc ; fun(ss,5); printf( %s,%s n ,ss[0],ss[4]); 程序的运行结果是
A) xy, aaaacc
B) aaaacc,xy
C) bcc,aabcc
D) aabcc,bcc
点击查看答案&解析
相关试题
设有以下语句: char x=3,y=6,2;...