2015 AP Computer Science A Released Exam Multiple Choices Free Download
2015 AP 計算機科學A公開卷選擇題部分免費下載
此套題僅 p I含有選擇題,
共計時1小時15分鐘,共40題
占總分50%
僅可以使用鉛筆答題
完整版下載鏈接見文末
部分真題預覽:
1)Consider the following incomplete method, which is intended to return the number of integers that evenly divide the integer inputVal. Assume that inputVal is greater than 0.
Which of the following can be used to replace / * condition * / so that numDivisors will work as intended?
inputVal % k == 0
k % inputVal == 0
inputVal % k != 0
inputVal / k == 0
k / inputVal > 0
4)Consider the following instance variable and method.
Method findMax is intended to return the largest value in the array arr. Which of the following best describes the conditions under which the method findMax will not work as intended?
The largest value in arr occurs only once and is in arr[0]?.
The largest value in arr occurs only once and is in arr[arr.length - 1].
The largest value in arr is negative.
The largest value in arr is zero.
The largest value in arr occurs more than once.
14)Consider the following method, biggest, which is intended to return the greatest of three integers. It does not always work as intended.
Which of the following best describes the error in the method?
biggest always returns the value of a.
biggest may not work correctly when c has the greatest value.
biggest may not work correctly when a and b have equal values.
biggest may not work correctly when a and c have equal values.
biggest may not work correctly when b and c have equal values.