1、你認為可以完成編寫一個C語言編譯器的語言是()
A.匯編
B.C語言
C.:VB
D.以上全可以
2、在帶頭結點的雙向循環鏈表中插入一個新結點,需要修改的指針域數量是()
A.2個
B.6個
C.3個
D.4個
3、以下程序的打印結果是()
1.#include
2.using namespace std;
3.
4.void swap_int(int a , int b)
5.{
6. int temp = a;
7. a = b;
8. b = temp;
9.}
10.
11.void swap_str(char*a , char*b)
12.{
13. char*temp = a;
14. a = b;
15. b = temp;
16.}
17.
18.int main(void)
19.{
20. int a = 10;
21. int b = 5;
22. char*str_a = "hello world";
23. char*str_b = "world hello";
24. swap_int(a , b);.
25. swap_str(str_a , str_b);
26. printf("%d %d %s %s\n",a,b,str_a,str_b);
27.
28. return 0;
29.}
A.10 5 hello world world hello
B.10 5 world hello hello world
C.5 10 hello world world hello
D.5 10 world hello hello world
4、下列代碼的輸出結果是_____
boolean b=true?false:true==true?false:true;
System.out.println(b);
A.true
B.false
C.null
D.空字符串
5、以下程序的輸出結果是?
int x = 1;
do{
printf("%2d\n",x++);
}while(x--);
A.1
B.無任何輸出
C.2
D.陷入死循環
6、假設以數組A[60]存放循環隊列的元素,其頭指針是front=47,當前隊列有50個元素,則隊列的尾指針值為()
A.3
B.37
C.97
D.50
7、一個棧的入棧序列是a,b,c,d,e,f,則棧的不可能的輸出序列是()
A.fedcba
B.defbca
C.defcba
D.abcdef
8、下面模板聲明中,哪些是非法的()
A.templateclass C1{};
B.templateclass C2{};
C.templateclass C3{};
D.templateclass C4{};
參考答案:
1~5:DDABD 6~8:B B BD