欢迎来到PP题库网 PP题库官网
logo

单项选择题

有以下程序:
#include <stdio.h>
#include <stdlib.h>
void fun(int*p1, int *s)
{ int *t;
t=(int *)malloc(2 * sizeof(int));
*t=*p1 + *p1 ++;
*(t+1)=*p1+ *p1;
s=t;
}
main()
{
int a[2]={1,2},b[2]={0};
fun(a,b);
printf("%d,%d\n",b[0],b[1]);
}
程序运行后的输出结果是______。

    A.2,6
    B.0,0
    C.2,4
    D.1,2
点击查看答案&解析
微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题