int x = 32;
if( x % 2) cout << "odd" ;
else cout << "even" ;
Quiz 2
Quiz
•
Computers
•
University
•
Hard
MA CPC
Used 3+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int x = 32;
if( x % 2) cout << "odd" ;
else cout << "even" ;
odd
even
syntax error
odd even
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int x = 8;
if( x > 10) cout << "yes" ;
else cout << "no" ;
YES
NO
no
yes
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int age = 22;
if(age >= 18 && age < 65) cout << "adult";
else cout << "not adult";
adult
not Adult
syntax error
adult not adult
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int x = 0;
if(x) cout << " non-zero";
else cout << "zero";
Non-zero
zero
syntax error
Non-zero Zero
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
char grade = 'B';
if(grade == 'A') cout << "Excellent";
else if(grade == 'D') cout << "Pass";
Excellent
Good
Pass
None of the above
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int a = 3;
if (a = 5)
cout << "True";
else
cout << "False";
True
False
Syntax error
None of the above
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int x = 2;
cout << ( ( x > 2) ? "Good" : "Bad" );
Bad
Good
Syntax error
None of the above
10 questions
Nested Statement
Quiz
•
University
15 questions
Qûîz
Quiz
•
University
9 questions
C++ Puntatori
Quiz
•
University
10 questions
Quiz 8: Arrays&Vector
Quiz
•
University
15 questions
Java
Quiz
•
University
15 questions
Quiz 2 - CS110
Quiz
•
University
10 questions
CSC126_Chapter4_Part1
Quiz
•
University
15 questions
EDA PARTE 2
Quiz
•
University
15 questions
Multiplication Facts
Quiz
•
4th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
20 questions
math review
Quiz
•
4th Grade
5 questions
capitalization in sentences
Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions
Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines
Quiz
•
Professional Development
12 questions
Dividing Fractions
Quiz
•
6th Grade