单选题 C语言
题号 #2274218

有以下程序:   
#include  <stdio.h>
int a=1,b=2:
void funl(int a,int b)
{printf(  "%d%d",a,b);  }
void fun2(  )
{  a=3;b=4;  }
main(  )
{  funl(5,6);fun2(  );
 printf("%d%d\n",a,b);   
}
程序运行后的输出结果是(  )。

进入在线模考

参考答案

B

答案解析

Funl是输出局部变量的值,fun2是把全局变量的值改成3和4,所以输出的结果是5634。

你可能感兴趣的试题

找试题 · 找答案 · 找资料 在线模考