Tutorials
Search... Sign In
Practice
Jobs
DSA Practice Problems C C++ Java Python JavaScript Data Science Machine Learning Courses Linux DevOps SQL Web Develop
C File Handling
This File handling in C Quiz will help you to test and validate your knowledge of file handling in C. It covers a variety of questions, from basic to
advanced. You just have to assess all the given options and click on the correct answer.
Last Updated : May 30, 2025 Discuss
Question 1
Which of the following true about FILE *fp
A FILE is a keyword in C for representing files and fp is a variable of FILE type.
B FILE is a structure and fp is a pointer to the structure of FILE type
C FILE is a stream
D FILE is a buffered stream
Discuss it
Question 2
When fopen() is not able to open a file, it returns
A EOF
B NULL
C Runtime Error
D Compiler Dependent
Discuss it
Question 3
When does getc() returns EOF?
A End of files is reached
B When getc() fails to read a character
C Both of the above
D None of the above
Discuss it
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
Got It !
acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Question 4
Which of the following is corrrect?
In fopen(), the open mode "wx" is sometimes preferred over "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.
A Only 1
B Only 2
C Both 1 and 2
D Neither 1 nor 2
Discuss it
Question 5
fseek() should be preferred over rewind() mainly because
A rewind() doesn\'t work for empty files
B rewind() may fail for large files
C In rewind, there is no way to check if the operations completed successfully
D All of the above
Discuss it
Tags: C Quiz
There are 5 questions to complete.
Take a part in the ongoing discussion View All Discussion
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Company Explore Tutorials DSA Data Science & Web
About Us Job-A-Thon Python Data Structures ML Technologies
Corporate & Communications Legal Offline Java Algorithms Data Science With HTML
Address: Privacy Policy Classroom C++ DSA for Python CSS
Careers Program PHP Beginners
A-143, 7th Floor, Machine Learning JavaScript
Sovereign Corporate In Media DSA in GoLang Basic DSA ML Maths TypeScript
Tower, Sector- 136, Noida, Contact Us JAVA/C++ SQL Problems Data Visualisation ReactJS
Uttar Pradesh (201305) Corporate Master R Language DSA Roadmap Pandas NextJS
Solution System Android DSA Interview
Registered Address: NumPy NodeJs
Campus Design Questions
K 061, Tower K, Gulshan NLP Bootstrap
Training Master CP Competitive
Vivante Apartment, Sector Deep Learning Tailwind CSS
137, Noida, Gautam Buddh Program Videos Programming
Nagar, Uttar Pradesh,
201305 Python Computer DevOps System School Databases
Tutorial Science Git Design Subjects SQL
Python GATE CS AWS High Level Mathematics MYSQL
Examples Notes Docker Design Physics PostgreSQL
Django Operating Kubernetes Low Level Chemistry PL/SQL
Tutorial Systems Azure Design Biology MongoDB
Python Computer GCP UML Diagrams Social Science
Projects Network DevOps Interview Guide English Grammar
Advertise with us Python Database Roadmap Design Patterns
Tkinter Management OOAD
Web Scraping System System Design
OpenCV Software Bootcamp
Tutorial Engineering Interview
Python Digital Logic Questions
Interview Design
Question Engineering
Maths
Preparation More Courses Programming Clouds/Devops GATE 2026
IBM Languages DevOps GATE CS Rank
Corner Tutorials
Certification C Programming Engineering Booster
Company- Software
Courses with Data AWS Solutions GATE DA Rank
Wise Development
DSA and Structures Architect Booster
Recruitment Software
Placements C++ Certification GATE CS & IT
Process Testing
Web Programming Salesforce Course - 2026
Aptitude Product
Development Course Certified GATE DA
Preparation Management
Data Science Java Administrator Course 2026
Puzzles Project
Programming Programming Course GATE Rank
Company- Management
Languages Course Predictor
Wise Linux
DevOps & Python Full
Preparation Excel
Cloud Course
All Cheat
Sheets
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our Cookie Policy & Privacy Policy