阿摩線上測驗
登入
首頁
>
水利會◆程式設計概要
>
113年 - 113 灌溉管理組織新進農田水利事業人員甄試試題_綜合行政人員資訊組:程式設計概要#144221
> 試題詳解
10.【表 10】Java 程式片段執行後之輸出為何?
(A) 3
(B) 11
(C) 14
(D) 40
答案:
登入後查看
統計:
尚無統計資料
相關試題
11.【表 11】C++程式片段執行後之輸出為何? (A) 26 (B) 17 (C) 22 (D) 23
#4019231
12.【表 12】C++程式片段執行後之輸出為何? (A) 2.6 (B) 1.7 (C) 2.2 (D) 2.3
#4019232
13.若 C++程式中已宣告「int array[3]={1,2,3}; int *parray=array;」,下列何者是呼叫【表 13】Test 函式 並傳遞 parray 指標的指令? (A) Test(parray); (B) Test(*parray); (C) *Test(parray); (D) Test(&parray);
#4019233
14.【表 14】Python 程式執行後之輸出為何? (A) 3 (B) 4 (C) 6 (D)有錯誤無法執行
#4019234
15.【表 15】Python 程式執行後之輸出為何? (A) { '2': '貳'} (B) { '2': '貳', '2': '二'} (C) {'1': '壹', '2': '貳'} (D)有錯誤無法執行
#4019235
16.【表 16】Python 程式執行後之輸出為何? (A) k=-5 (B) k=4 (C) k=-20 (D)有錯誤無法執行 【表 16】 【表 17】
#4019236
17.【表 17】Python 程式執行後之輸出為何? (A) 1234 (B) 4321 (C) 432 (D)不會輸出數字串,但產生類似下列訊息:generator object iset at 0x0000… int test=8; test +=2.5; System.out.println(test); int i, sum=0; for (i=1; i<=5; i+=2) sum +=1; System.out.println(sum); int i=0; do { if (i==4) break; i++;} while (i>0); System.out.println(i); int i,sum=0; for (i=1; i<=10; i++){ if(i%2==0) continue; sum++;}; System.out.println(sum); int x=2,y=3; int [] z={6, x, x+y}; System.out.println(z[2]); int i,j=0, count=0; for (i=0; i<10 ;i++) do { j++; count++;} while (j cout << count; int i,j, count=0; for (i=0; i<10 ;i++) for (j=i; j<10; j++) count++; cout << count; int outer = 0; while (outer++ <= 4){ if (outer !=3) continue; int inner = 0; while (inner++ < outer) cout << setw(3) << inner;} int array[] = {30, 47, 26, 17, 22, 23}; cout << array[1]+array[2]<< endl; int [][] A=new int [3][]; A[0]=new int[2]; A[1]=new int[4]; A[2]=new int[5]; System.out.println(A.length); short array[] = {30, 47, 26, 17, 22, 23}; short *x; const int test = (sizeof array)/(sizeof array[0]); x = &array[test-2]; cout << *x << endl; double array[] = {3.0, 4.7, 2.6, 1.7, 2.2, 2.3}; const int test = (sizeof array)/(sizeof array[0]); cout.precision(1); cout.setf(ios::fixed); cout << *(array+test-3) << endl; void Test(int *num){ for (int i=0; i<5; i++) cout << *num++;} t4 = (1,2,3,4) t5 = (t4,5,6) print(len(t5)) num1={'1':'壹','2':'二'} num2={'2':'貳'} num1.update(num2) print(num1) def run(func, x, y): return func(x, y) k = run(lambda a,b: a*b, -5, 4) print('k=', k) def iset(start, stop, step=1): if start < stop: i = start while i < stop: yield i i = i + step else: i = start while i > stop: yield i i = i + step x = iset(4,1,-1) print(x, end="") 【請接續下頁】
#4019237
18.下列何種 C++函式可以終止程式執行? (A) break() (B) exit() (C) end() (D) stop()
#4019238
19.如果 C++程式中已有「int array[3][4] = {{0,1, 2, 3},{1,4,5,6},{2,7,8,9}};」之宣告,下列何者為宣告傳 遞整個此二維整數陣列的函式表頭? (A) void callArray(int array) (B) void callArray(int array[][]) (C) void callArray(int array[3][]) (D) void callArray(int array[][4])
#4019239
20.下列前三項 Java 程式片段執行完後,何者之變數「sum」之值與其他二項結果不同,或三者均相同? (A) int sum=0; for (;;) { if (sum==10) break; sum++;} (B) int sum=0; while (true) { if (sum==10) break; sum++;} (C) int sum=0; do { sum++; if (sum==10) break;} while (true); (D)三者均相同
#4019240
相關試卷
115年 - 115 灌溉管理組織新進農田水利事業人員甄試試題_綜合行政人員資訊組:程式設計概要#144212
2026 年 · #144212
113年 - 113 灌溉管理組織新進農田水利事業人員甄試試題_綜合行政人員資訊組:程式設計概要#144221
2024 年 · #144221
111年 - 111 灌溉管理組織新進農田水利事業人員甄試試題_一般行政人員資訊組_程式設計概要#121559
2022 年 · #121559
109年 - 109 農田水利新進人員聯合統一考試_一般行政人員(電腦組):程式設計概要#92343
2020 年 · #92343
105年 - 105 農田水利會新進職員聯合統一考試_一般行政人員-電腦組:程式設計概要#90362
2016 年 · #90362
102年 - 102 農田水利會新進職員聯合統一考試_一般行政人員-電腦組:程式設計概要#28392
2013 年 · #28392
97年 - 97 農田水利會新進職員聯合統一考試_一般行政人員電腦組:程式設計概要#28404
2008 年 · #28404
92年 - 92 農田水利會新進職員聯合統一考試_一般行政人員電腦組:程式設計概要#105202
2003 年 · #105202