C++ : Selection

Quiz
•
Computers
•
University
•
Medium
ENNA NAWI
Used 11+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
The data type of the variable in the switch and value of a case must not be of the same type.
True
False
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
The _____ in switch statement is used to terminate the current sequence.
default
goto
break
jump
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
The default statement is optional and it can be used anywhere inside the switch statement.
True
False
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
We can have any number of case statements within a switch
True
False
5.
MULTIPLE CHOICE QUESTION
45 sec • 5 pts
What set of characters do you use to create a compound statement (block of code) in C++?
[ ]
( )
{ }
< >
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which one is the correct syntax for C++?.
if [ gross > 100000 ] then
net = gross - tax;
if ( gross > 100000 )
net = gross - tax;
if { gross > 100000 } then
net = gross - tax;
if < gross > 100000 > then
net = gross - tax;
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is printed by the following program segment?
HelloWorld!
Hello
Hello
World!
World!
8.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Based on the following program segment, what is the output when input code is 'B'?
applebanana
bananacarrotinvalid
banana
invalid
9.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following conditions is to test whether weight is in between 50 to 90?
if (weight > 50 && weight < 90)
if (weight < 50 && weight > 90)
if (weight > 50 || weight < 90)
if (weight < 50 || weight > 90)
Similar Resources on Wayground
10 questions
FOP - CHAPTER 6

Quiz
•
University
11 questions
Basic HTML & HTML5

Quiz
•
University
8 questions
Quiz4: Making Decisions

Quiz
•
University
10 questions
HTML/CSS Quiz

Quiz
•
10th Grade - University
8 questions
Webtech Tut2

Quiz
•
University
10 questions
html тегтеріне тапсырма

Quiz
•
University
10 questions
Complexity Quizz

Quiz
•
University
14 questions
JavaScript

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade