
C++ File Handling and Control Statements Quiz

Quiz
•
Computers
•
12th Grade
•
Medium
Fidaa Abed
Used 2+ times
FREE Resource
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?
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
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to open a file in C++ for reading or writing?
openFile()
createFile()
open()
ofstream() / ifstream()
9.
WORD CLOUD QUESTION
2 mins • Ungraded
What is your favorite thing to do in Ramadan
Similar Resources on Wayground
10 questions
🔦 Formative Assessment 2: Flow Controls

Quiz
•
12th Grade
14 questions
Rad s datotekama u C++

Quiz
•
12th Grade
12 questions
Computer Science

Quiz
•
9th - 12th Grade
10 questions
Paper 3 - Protocol

Quiz
•
12th Grade
11 questions
Google Collaboration

Quiz
•
9th - 12th Grade
12 questions
File Management

Quiz
•
9th - 12th Grade
10 questions
VB Quiz

Quiz
•
5th Grade - University
14 questions
LA4.C4: Conditions and Loops

Quiz
•
9th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade