MCQ with answers for (OOP) | Object Oriented Programming | 22316 [File Operations] MSBTE
Subject subject details Program: Diploma in Computer engineering Program Code CO Scheme I Semester 3 Course: Object Oriented Programming Course Code 22316 1. Which header file is required to use file I/O operations? a)<ifstream> b)<ostream> c)<fstream> d)<iostream> Answer: c Explanation: <fstream> header file is needed to use file I/O operations in C++. This header file contains all the file I/O operations definition. 2. Which of the following is used to create an output stream? a) ofstream b) ifstream c) iostream d) fsstream Answer: a Explanation: ofstream is used to create an output stream in C++ file handling operations. Ofstream objects are used to read files. 3. Which of the following is used to create a stream that performs both input and output operations? a) ofstream b) ifstream c) iostream d) fstream Answer...

Comments
Post a Comment