Training high school teachers to teach AP Computer Science Principles
Select Page
Programming Quiz
Results
#1 Given the following procedure run, what is the output of run(25) ?
20
25
3
#2 If below is a binary search tree formed by inserting the elements in the order: 25, 12, 28, 15, 30, 2, 8,27; What will be the right most child of at 12?
28
30
8
15
#3 Consider the following code segment where ‘f’ is a function that is defined as shown below. What value is returned by the function call f ( 30 , 100 ) ?
100
0
30
Can't be determined
#4 What will be the output of the following code segment?
Binary is base 2 Base 16 Base 10
a.hexaDecimal() Binary is base 2 Base 10
Base 16 Binary is 2
Base 16 Binary is base 2 Base 10
#5 Which of the following correctly uses an assignment operator with the values m and n?
m == n
m = n
m && n
Both A and C
#6 What is the output of the following code segment?
False!Verified!
True!
Verified!
True!Verified!
#7 What is the output of this code?
Hi there!
Hi there!Thank you!
Thank you!
Error: non-static method director() cannot be referenced from a static context
#8 What is the output of the following program?
Touch screen available! iphone
Touch screen not available! Samsung TV
Touch screen available! iphone Touch screen not available! Samsung TV
Touch screen not available! Samsung TV Touch screen available! iphone
#9 ‘a’ is an array containing percentages of six students. We have to assign grades for each of the student based on their percentages as stated above. Consider the below two code segments (i) and (ii) and determine which of them would correctly assign the grades.
(i) is correct
(ii) is correct
Both (i) and (ii) are correct
Depends, sometimes (i) is correct and sometimes (ii) is correct
#10 Given the function “fun”, what will be the output of fun (16) ?