
SLG IPC Week 4
Authored by Novell Rasam
Computers
University
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Did you turn memes on?
Yes, of course. Who could forget the memes?
What memes? I don't remember seeing that option.
I saw the option, but didn't turn them on.
They're already on by default.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does default do in a switch statement?
Executes code regardless if a case matches or not.
Executes code in the event no case is matched.
Exits from the switch construct.
What's a switch statement?
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
if (minutes > 1)
s = 's';
else
s = ' ';
Can be rewritten as?
s =
minutes > 1 ? 's' : ' ';
s =
if (minutes > 1)
's' : ' ';
s =
minutes > 1 ? ' ' : 's';
s = 's' : ' ';
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Pick the odd one out.
While
Do while
For
Switch
5.
OPEN ENDED QUESTION
1 min • Ungraded
What is the difference between a do while and a regular while loop?
Evaluate responses using AI:
OFF
6.
OPEN ENDED QUESTION
2 mins • Ungraded
Write an example of a for loop.
Evaluate responses using AI:
OFF
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which for loop uses a flag properly?
for (int i = 0; i < 10 && done == 0; i++)
for (int flag = 0; flag < 10; flag++)
for (i = 0; flag == 0; i++)
for (int i = 0; i < 10 && i == 0; i++)
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?