問題詳情

55. All of the following are true of functions EXCEPT:
(A) a function call must specify the name and arguments, if any, of the function
(B) the implementation of a function is hidden from the caller
(C) the definition of a function is always visible to other functions
(D) they define specific tasks that can be used at many points in a program

參考答案

答案:C
難度:計算中-1
書單:沒有書單,新增

用户評論

【用戶】不叫賭俠的陳小刀

【年級】高三下

【評論內容】以下所有函數都適用,除了:(C) the definition of a function is always visible to other functions(C) 一個函數的定義總是對其他函數可見在編程語言中,函數的實現細節通常對調用者隱藏,選項 (B) 中提到了這一點。這個概念被稱為封裝,允許在代碼中實現更好的模塊化和抽象。但是,函數本身的定義並不總是對其他函數可見。這取決於編程語言的範圍和可見性規則。在許多編程語言中,函數可以聲明為私有或具有有限的可見性,從而使其他函數無法訪問它們的定義。

【用戶】不叫賭俠的陳小刀

【年級】高三下

【評論內容】以下所有函數都適用,除了:(C) the definition of a function is always visible to other functions(C) 一個函數的定義總是對其他函數可見在編程語言中,函數的實現細節通常對調用者隱藏,選項 (B) 中提到了這一點。這個概念被稱為封裝,允許在代碼中實現更好的模塊化和抽象。但是,函數本身的定義並不總是對其他函數可見。這取決於編程語言的範圍和可見性規則。在許多編程語言中,函數可以聲明為私有或具有有限的可見性,從而使其他函數無法訪問它們的定義。