
C++ File Handling and Control Statements Quiz
Authored by Fidaa Abed
Computers
12th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Where can the 'continue' statement be used in C++?
Inside functions
Only inside switch statements
Inside loops and switch statements
Only inside loops
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the 'break' statement do in C++?
Pauses the execution of the loop
Stops the execution of the loop and exits it
Skips the rest of the code inside the loop and continues with the next iteration
Breaks the program
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which header file must be included to use file I/O operations in C++?
<fstream>
<ifstream>
<ofstream>
<filestream>
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to close a file in C++?
closeFile()
fclose()
fileClose()
close()
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does the following C++ code print?
What does the following C++ code print?
1 3
1 2 3 4
0 2 4
1 3 5
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does the 'continue' statement affect the flow of a loop in C++?
Terminates the loop immediately
Skips the current iteration and proceeds with the next one
Pauses the loop temporarily
None of the above
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following C++ code snippet?
1 2 3 4
1 2 4
1 2
1 2 4 5
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?