
Files in C
Authored by Manoj R
Computers
University
Used 2+ 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
30 sec • 1 pt
What is file handling in C?
File handling in C is the process of working with files to perform input/output operations.
File handling in C is the process of baking cookies
File handling in C is the process of skydiving
File handling in C is the process of gardening
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you open a file in C?
fopen()
create()
read()
open()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function is used to close a file in C?
fdelete()
fopen()
fclose()
fclose(
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you read from a file in C?
fopen(), fwrite(), fclose()
open(), read(), close()
fopen(), read(), fclose()
fopen(), fgets() or fread()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the function to write to a file in C?
fwrite()
fput()
fopen()
fscan()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between 'r' and 'w' modes when opening a file in C?
The 'r' mode is for reading files, and the 'w' mode is for appending files.
The 'r' mode is for reading files, and the 'w' mode is for writing files.
The 'r' mode is for writing files, and the 'w' mode is for reading files.
The 'r' mode is for reading and writing files, and the 'w' mode is for reading files.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you check if a file has been successfully opened in C?
if (file_pointer == -1) { // File opened successfully }
if (file_pointer != NULL) { // File opened successfully }
if (file_pointer == NULL) { // File opened successfully }
if (file_pointer == 0) { // File opened successfully }
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 Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?