APCS觀念題分析:程式基礎觀念
第一時間閱讀題目時,馬上確認要考的:
- 單元知識
基本輸入與輸出
資料型態與變數
控制流程:迴圈
控制流程:判斷條件
C語言陣列
函式與遞迴
- 題型
- 程式運行追蹤 (
code tracing
)
- 程式填空 (
code completion
)
- 程式除錯 (
code debugging
)
- 程式效能分析 (
code performance analysis
)
- 基礎觀念理解 (
basic concepts understanding
)
105年3月試題
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
控制流程:迴圈
code debugging
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
控制流程:迴圈
code tracing
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
控制流程:迴圈
code tracing
參考解答
a[0] = 0
a[1] = b[1] + a[0] = 1
a[2] = b[2] + a[1] = 3
a[3] = b[3] + a[2] = 6
a[4] = b[4] + a[3] = 10
a[5] = b[5] + a[4] = 15
…
a[i] = i + a[i-1] = i + [(i-1) +a[i-2]] = … = 1+2+3+…+i = ((1+i)* i) /2
所以,a[50]-a[30] =1225 - 425 = 810
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
函式與遞迴
code performance analysis
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
函式與遞迴
code tracing
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
不要看到費氏數列就以為是遞迴!
控制流程:迴圈
basic concepts understanding
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
控制流程:迴圈
C語言陣列
code tracing
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
函式與遞迴
code tracing
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
控制流程:迴圈
C語言陣列
code completion
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
函式與遞迴
code tracing
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
控制流程:迴圈
code completion
分析輾轉相除法,i帶入每回合被除數、j帶入每回合除數、k是每回合的餘數、以及把最後結果帶給j
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
函式與遞迴
code tracing
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
控制流程:判斷條件
控制流程:迴圈
code performance analysis
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
控制流程:判斷條件
code tracing
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
控制流程:判斷條件
控制流程:迴圈
應該要在allBig = FALSE就跳出,不需要再做任何比較
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
C語言陣列
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
函式與遞迴
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
控制流程:迴圈
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
控制流程:迴圈
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
控制流程:迴圈
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
函式與遞迴
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
函式與遞迴
這題是在考費氏數列的應用
105年10月試題
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
控制流程:迴圈
C語言陣列
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
控制流程:判斷條件
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
函式與遞迴
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
資料型態與變數
C語言跟Python int
只取整數部分,不進位

控制流程:迴圈
C語言陣列

函式與遞迴

控制流程:迴圈
所以整個程式總執行次數為 n2(n+1)/2

控制流程:判斷條件

函式與遞迴

控制流程:判斷條件
控制流程:迴圈
C語言陣列

控制流程:迴圈

C語言陣列

資料型態與變數

控制流程:迴圈
C語言陣列

指標不在目前考題範圍
- ptr1指向num的位址,則*ptr1 = num = 100
- ptr2指向ptr1的位址,則*ptr2 = ptr1,所以**ptr2 = num = 100

控制流程:迴圈

函式與遞迴

基本輸入與輸出

函式與遞迴

函式與遞迴

控制流程:迴圈

函式與遞迴

函式與遞迴
106年3月試題

函式與遞迴

函式與遞迴

函式與遞迴

控制流程:判斷條件
控制流程:迴圈

控制流程:迴圈
C語言陣列

函式與遞迴

函式與遞迴
這題要考的是變數的scope

控制流程:迴圈
C語言陣列

函式與遞迴

資料型態與變數

資料型態與變數

控制流程:迴圈

函式與遞迴

控制流程:迴圈

控制流程:判斷條件

控制流程:迴圈

控制流程:迴圈
控制流程:判斷條件

控制流程:迴圈
控制流程:判斷條件

函式與遞迴

函式與遞迴

資料型態與變數

資料型態與變數