Courses
Tutorials
Jobs
Practice
Contests
Data Structure
Java
Python
HTML
Interview Preparation
Trending Now
DSA
Web Tech
Foundational Courses
Data Science
Practice Problem
Python
Machine Learning
JavaScript
System Design
Django
DevOps Tutorial
Java
C
C++
ReactJS
NodeJS
CP Live
Aptitude
Puzzles
Projects
C Input and Output
C Operators
C++ Constructors
C Loops & Control Structure
C Structure & Union
C Macro & Preprocessor
GATE CS 2012
OS Process Management
CN Data Link Layer
Top MCQs on Linked List Data Structure with Answers
C File Handling
Question 1
Which of the following true about FILE *fp
FILE is a keyword in C for representing files and fp is a variable of FILE type.
FILE is a structure and fp is a pointer to the structure of FILE type
FILE is a stream
FILE is a buffered stream
Discuss it
Question 2
When fopen() is not able to open a file, it returns
EOF
NULL
Runtime Error
Compiler Dependent
Discuss it
Question 3
getc()
returns EOF when
End of files is reached
When getc() fails to read a character
Both of the above
None of the above
Discuss it
Question 4
In fopen(), the open mode "wx" is sometimes preferred "w" because. 1) Use of wx is more efficient. 2) If w is used, old contents of file are erased and a new empty file is created. When wx is used, fopen() returns NULL if file already exists.
Only 1
Only 2
Both 1 and 2
Neither 1 nor 2
Discuss it
Question 5
fseek() should be preferred over rewind() mainly because
rewind() doesn\'t work for empty files
rewind() may fail for large files
In rewind, there is no way to check if the operations completed successfully
All of the above
Discuss it
There are 5 questions to complete.
Last Updated :
Take a part in the ongoing discussion
View All Discussion
Trending in News
View More
Brave Search Brings 'Answer With AI' Feature For Users
Delta Game Emulator: Retro Gaming On iPhone or iPad
Meta To Add Real Time AI Image Generation To WhatsApp
10 Best Free Reverse Phone Number Lookup
System Design Interview Questions and Answers