What is the output result of the following program? #include <stdio.h> void fB(int\* p, int t) { int y = 4; t = 3 + y; \*p = y \* t; } main() { int x = 2, y = 1; fB(&y, x); printf("%4d%4d\n", x, y); }
A1 2
B35 7
C2 28正確答案
D1 35
答案與詳解
x 採傳值呼叫維持原值 2,y 採傳址呼叫被修改為 28,輸出結果符合。
Examly 收錄 38 萬+ 道歷屆題目,每題都有像這樣的精選詳解。免費下載,立即開練。
