What, if anything, is printed as a result of executing the code segment?
AP Computer Science A Unit 4 Section 1 (While loops)

Quiz
•
Computers
•
10th - 12th Grade
•
Hard
Herman Galioulline
Used 24+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
21
161116
161161
16111621
Nothing is printing because of an infinite loop.
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the value of count after executing the code segment?
6
5
4
1
0
3.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
This code segment is intended to store the sum of all multiples of 10 between 10 and 100, inclusive (10 + 20 + ... + 100), in the variable total.
What should /* missing code */ be?
x < 100
x <= 100
x > 10
x >= 10
x != 10
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
This code is intended to print the sum of the digits in num. For example, when num is 12345, the code segment should print 15, which represents the sum 1 + 2 + 3 + 4 + 5.
What should /* missing loop header */ be?
while (num > 0)
while (num >= 0)
while (num > 1)
while (num > 2)
while (num > sum)
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What, if anything, is printed as a result of executing the code segment?
0
1
2
3
Nothing is printed.
Similar Resources on Wayground
8 questions
CS A U1 Review

Quiz
•
12th Grade
10 questions
Unit 6

Quiz
•
12th Grade
10 questions
AP CSP-Review Session 1 MCQ Quiz

Quiz
•
10th Grade
10 questions
Python: Functions and Parameters

Quiz
•
9th - 12th Grade
10 questions
Comp Sci Unit 3 #11

Quiz
•
11th Grade
10 questions
AP CSP Review

Quiz
•
9th - 12th Grade
10 questions
AP CSA Unit 1 & 2 Review

Quiz
•
9th - 12th Grade
8 questions
Printing in Java

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade