Examly題庫立即開始練習
原住民族考試四等考試-電子工程類科計算機概要11328單選題

考慮下列 C 語言結構變數(Structure variable)的宣告: struct customer { int number; char name[20]; int age; char sex; }; struct customer John; 下列何者不是讀取一個 struct customer 欄位(Attribute)的位址(Address)?

A&John.number
BJohn.name
CJohn&age正確答案
D&John.sex
答案與詳解
C
正確答案
取結構欄位位址用 &變數.欄位;C 選項語法錯誤不是合法位址表示法。

為什麼答案是 C

John&age 語法錯誤,& 不能放在結構變數與欄位之間。正確寫法應為 &John.age,此為題目要選的「不是位址」之選項。

考點:合法取址考點:陣列名即位址考點:語法錯誤
載入中…

計算機概要 相關題目

想練更多計算機概要考古題?

Examly 收錄 38 萬+ 道歷屆題目,每題都有像這樣的精選詳解。免費下載,立即開練。

Download on theApp Store即將推出Google Play
黑皮