click below
click below
Normal Size Small Size show me how
Module 7
| Question | Answer |
|---|---|
| A function directly writes into the file: | fprintf() |
| File mode that opens or create a text file in writing mode | w |
| Writes a set of data to a file | fprintf() |
| File mode that opens a text in reading mode | r |
| It represents a sequence of bytes on the disk where a group of related data is stored. | File |
| EOF means | End of file |
| An operation wherein data is added to the existing data of a file | Append |
| It points to a structure that contains about the file: | File pointer |
| Which of the following header file is required for creating and reading files? | fstream |
| Which operator is used to insert the data into the file? | << |
| Which header file is required to use file I/O operations? | <fstream> |
| The ifstream would be used when: | reading a file |
| Which member function is used to determine whether the stream object is currently associated with a file? | is_open |
| Which stream class is used to both read and write on files? | fstream |
| When will the cin can start processing of input? | After pressing return key |
| What is the return type open() method? | bool |
| Writes a character to a file: | fopen() |
| What is the correct syntax for declaring a file pointer? | FILE *fp; |
| Creates a new file or open an existing file | fopen() |
| It is created for the permanent storage of data. | File |
| File mode that opens a text file in append mode | a |
| Refers to the name of the file | Filename |
| Which header file is used for reading and writing to a file? | #include<fstream> |
| Which of the following is used to create a stream that performs both input and output operations? | fstream |
| Which stream class is to only write on files? | ofstream |
| What is meant by ofstream in c++? | Writes to a file |
| Closes a file | fclose() |
| Reads a character from a file: | getc() |
| What can be used to input a string with blank space? | getline |
| By default, all the files in C++ are opened in _________ mode. | Text |
| Which of the following is used to create an output stream? | ofstream |
| What is the correct syntax for fclose()? | fclose(fp); |