2012軟件水平程序員考試考前練習(xí)(2)

字號:

2012年軟件水平程序員考試考前練習(xí)(2)
    1.以下不是c說話劃定保留字的是( )。
    (1)float
    (2)integer
    (3)signed
    (4) unsigned
    2.設(shè)int型變量x有初始值3,則表達(dá)式x++*5/10的值是( )
    (1)0
    (2)1
    (3)2
    (4)3
    3.下述軌范執(zhí)行后的輸出結(jié)不美觀是(?。?BR>    #include
    main()
    {
    int x=’f’;
    printf(“%c\n”,’a’+(x-’a’+1));
    }
    (1)G
    (2)H
    (3)I
    (4)J
    4.設(shè)有軌范,
    #include
    main()
    {
    int i,j;
    for (i=0,j=1;i《=j+1;i+=2,j--)
    printf(“%d\n”,i);
    }
    在運(yùn)行上述軌范時,for語句中輪回體的執(zhí)行次數(shù)是( )
    (1)3
    (2)2
    (3)1
    (4)0
    5.不才述選項時,沒有組成死輪回的軌范是( )
    (1)int i=100
    while (1)
    {
    i=i0+1;
    if (i》100)
    break;
    }
    (2)for (;;);
    (3)int k=1000;
    do
    {
    ++k;
    }while (k》=10000);
    (4) int s=36;
    while (s);--s;
    謎底:
    1.(2) 2.(2) 3.(1) 4.(3) 5.(3)