C++ : Selection

Quiz
•
Computers
•
University
•
Medium
ENNA NAWI
Used 12+ 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
BOOLEAN CLUB QUIZ 1

Quiz
•
University
11 questions
C Programming (Veri Tipi Dönüşümleri)

Quiz
•
University
11 questions
RO-CM2

Quiz
•
University
10 questions
TIN 11 BAI 6

Quiz
•
12th Grade - University
11 questions
Evaluación Aplicaciones Web

Quiz
•
University - Professi...
12 questions
Test 02 - Basics of Web Design

Quiz
•
University
12 questions
PSSI Chp 1 dan 2

Quiz
•
University
10 questions
JSTL and EL

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University