101 關務四等計算機概要 - 考試
By Oscar
at 2013-06-11T21:06
at 2013-06-11T21:06
Table of Contents
[考題] 國考歷屆考題與考題觀念討論(書裡看到的選這個)請附上想法、出處
出處:如題
下列C語言程式,產生的輸出為何?
#include <stdio.h>
void swap (int a, int b) {
int t = a;
a = b;
b = t;
}
main() {
int x =1, y=2;
swap(x, y);
printf("%d, %d\n", x, y);
}
猨
(A)1, 2
獏
(B)2, 1
獱
(C)1, 1
斅
(D)2, 2
答案:#
請問執行後應該不會變xy的值,所以不是應是A嗎?
--
出處:如題
下列C語言程式,產生的輸出為何?
#include <stdio.h>
void swap (int a, int b) {
int t = a;
a = b;
b = t;
}
main() {
int x =1, y=2;
swap(x, y);
printf("%d, %d\n", x, y);
}
猨
(A)1, 2
獏
(B)2, 1
獱
(C)1, 1
斅
(D)2, 2
答案:#
請問執行後應該不會變xy的值,所以不是應是A嗎?
--
Tags:
考試
All Comments
By Skylar DavisLinda
at 2013-06-13T17:52
at 2013-06-13T17:52
By Zanna
at 2013-06-18T06:29
at 2013-06-18T06:29
By Christine
at 2013-06-18T23:38
at 2013-06-18T23:38
By Hedy
at 2013-06-20T22:35
at 2013-06-20T22:35
By Rae
at 2013-06-23T14:35
at 2013-06-23T14:35
By Queena
at 2013-06-28T13:21
at 2013-06-28T13:21
By Agnes
at 2013-06-30T05:09
at 2013-06-30T05:09
By Andrew
at 2013-07-01T13:57
at 2013-07-01T13:57
By Queena
at 2013-07-04T18:56
at 2013-07-04T18:56
By James
at 2013-07-07T09:23
at 2013-07-07T09:23
By Hedwig
at 2013-07-07T17:20
at 2013-07-07T17:20
Related Posts
22期警專 物理
By Mason
at 2013-06-11T21:06
at 2013-06-11T21:06
中華郵政程式設計考科
By Aaliyah
at 2013-06-11T20:35
at 2013-06-11T20:35
經濟學--選擇題疑問
By Bethany
at 2013-06-11T19:22
at 2013-06-11T19:22
基本電學
By George
at 2013-06-11T19:07
at 2013-06-11T19:07
民法311條
By Kama
at 2013-06-11T18:42
at 2013-06-11T18:42