
Introduction to C++ 2024/25
Authored by Dzurejdz Crnkic
Computers
12th Grade
Used 13+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 3 pts
What is the correct syntax for an if statement in C++?
if x > 5 {}
if (x > 5) {}
if x > 5 then {}
if {x > 5}
2.
MULTIPLE CHOICE QUESTION
1 min • 3 pts
Which of the following is a valid declaration of an integer variable in C++?
int 1 number;
number int;
int number;
number : int;
3.
MULTIPLE CHOICE QUESTION
1 min • 3 pts
Which of the following is the correct way to read an integer from user input using cin?
cin >> int userInput;
int userInput;
cin << userInput;
int userInput;
cin >> userInput;
userInput = cin;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What data type would you use to store a single character in C++?
string
char
int
double
5.
MULTIPLE CHOICE QUESTION
30 sec • 3 pts
What will the following code display?
"x is greater than 5"
"x is not greater than 5"
"x is greater than 10"
None of the above
6.
MULTIPLE CHOICE QUESTION
30 sec • 3 pts
Which C++ logical operator is used for logical AND?
&&
||
!
&
7.
MULTIPLE CHOICE QUESTION
30 sec • 3 pts
What is the purpose of the "else if" statement in C++?
To declare variables
To create a nested if
To specify an alternative condition to be tested
To end a program
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?
Similar Resources on Wayground
13 questions
Socket
Quiz
•
12th Grade
14 questions
Python (I)
Quiz
•
12th Grade
12 questions
Στοίβα και ουρά ΓΕΛ
Quiz
•
12th Grade
15 questions
Problem Solving using Python and R - UNIT II - Dictionary
Quiz
•
12th Grade
10 questions
Visual Basic 2010
Quiz
•
8th Grade - University
12 questions
Remidi TLJ
Quiz
•
12th Grade
12 questions
1.2.4. Types of Programming Language
Quiz
•
12th Grade
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade