Board logo

標題: APCS 觀念題 10510 模擬考 16 [打印本頁]

作者: 李泳霖    時間: 2023-6-18 13:13     標題: APCS 觀念題 10510 模擬考 16

下列程式片段中, 假設 a、a_ptr 和 a_ptrptr 這三個變數都有被正確宣告,且呼叫 G() 函式時的參數為 a_ptr 及 a_ptrptr。G() 函式的兩個參數型態該如何宣告?
  1. void G ( ___(a)___ b_ptr,  ___(b)___ b_ptrptr)
  2. {
  3.     …
  4. }
  5. void main ()
  6. {
  7.    int b = 1;
  8.    // 加入 b_ptr, b_ptrptr 變數的宣告
  9.    …
  10.    b_ptr = &b;   
  11.    b_ptrptr = &b_ptr;  
  12.    G(b_ptr, b_ptrptr);
  13. }
複製代碼
本帖隱藏的內容需要回復才可以瀏覽

作者: 東緯    時間: 2023-6-18 13:45

此帖僅作者可見




歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://istak.org.tw/seed/) Powered by Discuz! 7.2