如題請版上高手幫忙解惑 1. 94年高考三級第一試 資訊考科的專業知識測驗(資料結構、程式語言),第57題 有一C程式中定義了以下巨集(macro): #define sum(a, b)a+b #define prod(a, b)a * b 則當以下兩行敘述執行結束時,ans1和ans2之值分別為何? ans1=10 * sum(1, 2); ans2=prod(3+4, 5); (A)ans1=12, ans2=23 (B)ans1=12, ans2=25 (C)ans1=30, ans2=23 (D)ans1=30, ans2=35 => 答案為何為(A) ?? 2. 新思路學習評量題目 若以下程式採用靜態領域規則來決定變數的領域,則其執行結果為何? program Main; var x : integer; procedure p1; procedure p2; var x : integer; begin {p2} x:= 0 p1 end; {p2} begin {p1} while x 答案為何為(B) ?? 如留言難以解釋,再煩請版上大大站內私信解答,謝謝^^ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.27.186.96※ 文章網址: http://www.ptt.cc/bbs/Examination/M.1416716561.A.0CB.html
This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.
You are receiving this email because you subscribed to this feed at blogtrottr.com.
留言列表