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
12 questions
Quiz 9: Pointer
Quiz
•
University
10 questions
Quiz 1
Quiz
•
University
10 questions
Topic2: If method
Quiz
•
University
11 questions
Quiz 2: C++ Basics
Quiz
•
University
10 questions
Kiến thức C++ cơ bản - Test1
Quiz
•
12th Grade - University
15 questions
Quiz Ke 6 alprog if-09
Quiz
•
University
9 questions
C++ Puntatori
Quiz
•
University
10 questions
Quiz 3
Quiz
•
University
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade