单项选择题
有以下程序:
# include <stdio.h>
# include <stdio.h>
void fun(int *p1, int *p2; int*s)
s=(int*) malloc(sizeof(int));
*s=*p1+*p2;
free(s);
main()
int a=1,b=40,*q=&a;
fun(&a,&b,q);
printf("%d\n",*q);
程序运行后的输出结果是( )。
A.42
B.0
C.1
D.41
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序: # include <stdio.h> int a=1, b=2; void fun1(int a,int b) printf( %d%d , a, b); void fun2() a=3; b=4; main() fun1(5, 6);fun2(); printf( %d%d n , a, b); 程序运行后的输出结果是( )。
A.1 2 5 6
B.5 6 3 4
C.5 6 1 2
D.3 4 5 6
点击查看答案&解析
单项选择题
有以下程序: # include <stdio.h> main() (char a[5][10]= one , two , three , four , five ); int i, j; char t; for(i=0;i<4;i++) for(j=i+1;j<5;j++) if (a[i][0]>a[j][0]) t=a[i][0]; a[i][0]=a[j][0]; a[j][0]=t; ) puts(a[1]); 程序运行后的输出结果是( )。
A.fwo
B.fix
C.two
D.owo
点击查看答案&解析
相关试题
有以下程序: # include <stdio.h>...
有以下程序: # include <stdio.h>...