
C++ Files Review
Authored by Ferhat Travaci
Computers
9th - 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
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which C++ library allows us to work with files?
filestreams
fstream
string
vector
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which class from the fstream library is used to create and write to files?
ifstream
ofstream
fstream
filemanager
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code. What will it do?
Reads from filename.txt
Creates a file but does not write anything
Creates a file named filename.txt and writes 'Writing to a file.' into it
Outputs 'Writing to a file.' on the console
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which class would you use to read from a file in C++?
ofstream
fstream
ifstream
filemanager
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code. What does it do?
Reads the content of filename.txt and prints it on console
Writes 'filename.txt' to the console
Creates a file called filename.txt
Deletes filename.txt
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary purpose of the ifstream class in C++?
To write data to files
To read data from files
To delete files
To manage file permissions
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct way to open a file for reading in C++?
ofstream file('example.txt');
ifstream file('example.txt');
fstream file('example.txt', ios::out);
filemanager file('example.txt');
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
10 questions
Kuis Pengayaan (Aplikasi Sehari-hari?
Quiz
•
9th Grade
12 questions
Windows 10 Installation
Quiz
•
11th - 12th Grade
12 questions
Microsoft Office Word
Quiz
•
4th Grade - University
10 questions
Soal Ujian Komputer
Quiz
•
10th - 12th Grade
10 questions
SOAL WEB BROWSER & MICROSOFT OFFICE WORD
Quiz
•
9th Grade
10 questions
Computer Languages
Quiz
•
6th - 12th Grade
13 questions
வகுப்பு 12 - அடோப் இன்டிசைன் CC 2019
Quiz
•
12th Grade
10 questions
python quiz
Quiz
•
6th Grade - Professio...
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
El Verbo IR Practice
Quiz
•
9th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
20 questions
Exponent Properties
Quiz
•
9th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade