
Stack & Queue, File Input and Output
Authored by Gorantla Gopal
Computers
Professional Development
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
42 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a file in C programming?
A pointer to memory
A collection of characters stored on disk
A data type
A library function
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true about text files?
They store data in binary form
They are readable by text editors
They cannot use fprintf()
They use fread() to read data
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Binary files are typically used when:
We want human-readable data
We want to store structured data efficiently
We need to print text
We use scanf()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the FILE* pointer in C represent?
File descriptor
File status
File stream
Memory buffer
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to open a file in C?
fopen()
open()
read()
getfile()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to close a file?
fcloseall(fp);
fileclose(fp);
fclose(fp);
close(fp);
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following can be used to write formatted data to a file?
fprintf()
scanf()
getc()
puts()
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?