有以下程序:include <stdio.h>int a=1,b=2:void funl(int a,int b){printf( "%d%d&am
有以下程序:
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);
}
程序運行后的輸出結(jié)果是( )。
A.1 2 5 6
B.5 6 3 4
C.5 6 1 2
D.3 4 5 6
正確答案:BFunl是輸出局部變量的值,fun2是把全局變量的值改成3和4,所以輸出的結(jié)果是5634。
詞條內(nèi)容僅供參考,如果您需要解決具體問題
(尤其在法律、醫(yī)學(xué)等領(lǐng)域),建議您咨詢相關(guān)領(lǐng)域?qū)I(yè)人士。