Unit 4 AP CSA Review
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
Mark Freeman
Used 7+ times
FREE Resource
Enhance your content in a minute
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output by the following code?
iahbgcfd → This loop will interleave the characters of str1 and str2, starting with the end of str2 and start of str1. The loop will only interleave 4 sets of characters, because str1.length() == 4. This prevents the e in str2 from being printed
aibhcgdf → If the order of the print statements were reversed, then this would be the correct output
ibhcgde → The a should be included in the output, and the e should be excluded. See choice a
Index out of Bounds Error → If we were checking the condition j >= 0, then we’d have an index out of bounds error
iahbgcfde → There should be no e at the end of the output. The loop ends before it prints the e
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements will return a random even number between 6 and 14 inclusive?
6 + 2 * (int) (4 * Math.random())
6 + (int) (8 * Math.random())
4 + 2 * (int) (5 * Math.random())
(int) (Math.random() * 14) - 6
6 + 2 * (int) (5 * Math.random())
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose which three values should replace the blanks in the for loop so that it loops through the numbers: 1 3 5 7 9. Note that the choices will fill in the three blanks in the order in which they appear.
1, <10, +=2
1, <9, ++
0, <10, ++
1, <=9, ++
0, <9, +=2
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does short circuit evaluation mean in the following code?
if a < b is false, then c != d is not evaluated
if a < b is true then c != d is not evaluated
if c != d is false, then a < b is not evaluated
if c != d is true, then a < b is not evaluated
if a < b is false, then c != d is evaluated
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following code segments will print all numbers divisible by 5 between 1 and 50 in ascending order?
I only
II and III only
II only
I and II only
I, II and III
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Assume that x and y are boolean variables and have been properly initialized. Which of the following best describes the result of evaluating the expression (x && y) || !(x || !y)?
true only when x and y have the same value
true only when y is true
true only when x is true
Always false
Always true
7.
OPEN ENDED QUESTION
3 mins • 1 pt
Consider the following output: 4 3 2 1 3 2 1 2 1 1 Which of the following code segments will produce this output?
Evaluate responses using AI:
OFF
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
17 questions
Quiz 01 Keamanan Jaringan
Quiz
•
12th Grade
15 questions
ONLINE Quiz - Computer Hardware Basics (COMSYS 1)
Quiz
•
12th Grade
13 questions
Five Nights At Freddy's: Security Breach Quiz
Quiz
•
KG - Professional Dev...
14 questions
Bài 29. Nhận biết lỗi chương trình
Quiz
•
9th - 12th Grade
8 questions
Overview of IT
Quiz
•
6th Grade - University
15 questions
4.6.4 Logic Gates
Quiz
•
10th Grade - Professi...
12 questions
Wee Word Intro
Quiz
•
7th - 12th Grade
15 questions
หน่วยที่ 1 ความรู้พื้นฐานการจัดการ ข้อมูลขนาดใหญ่ (Big Data)
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade
10 questions
Valentine's Day: History and Modern Celebration
Interactive video
•
9th - 12th Grade
11 questions
Valentine's Day Trivia
Quiz
•
8th - 12th Grade
10 questions
Factor Quadratic Expressions with Various Coefficients
Quiz
•
9th - 12th Grade
18 questions
Success Strategies
Quiz
•
9th - 12th Grade
10 questions
Valentine's Day Trivia
Quiz
•
9th - 12th Grade
