File handling Reviewer
Quiz yourself by thinking what should be in
each of the black spaces below before clicking
on it to display the answer.
Help!
|
|
||||
---|---|---|---|---|---|
show | fclose(fp);
🗑
|
||||
show | fprintf()
🗑
|
||||
show | reading a file
🗑
|
||||
Which stream class is to ONLY write on files? | show 🗑
|
||||
What is the output of the given program? #include <iostream> using namespace std; int main() { char str[] = "Steve jobs"; int val = 65; char ch ='A'; cout << val << endl; return 0; } | show 🗑
|
||||
It points to a structure that contains about the file: | show 🗑
|
||||
show | Append
🗑
|
||||
show | fopen()
🗑
|
||||
show | fp = fopen("one.txt", "w");
🗑
|
||||
show | w
🗑
|
||||
show | getc()
🗑
|
||||
What does the following code do? while( (ch = getchar()) != '/n') { putc(ch,fp); } | show 🗑
|
||||
Refers to the name of the file | show 🗑
|
||||
show | fprintf()
🗑
|
||||
What is the output of the given program? #include <iostream> using namespace std; int main() { char str[] = "Steve jobs int val = 65; char ch = 'A'; cout << val << endl; return 0; } | show 🗑
|
||||
A C++ library that allows working with files | show 🗑
|
||||
Which operator is used to insert the data into the file? | show 🗑
|
||||
show | reading a file
🗑
|
||||
show | #include<fstream>
🗑
|
||||
show | a
🗑
|
||||
EOF means ______________________ | show 🗑
|
||||
What is the correct syntax for declaring a file pointer? | show 🗑
|
||||
show | fopen()
🗑
|
||||
show | getline
🗑
|
||||
show | Writes to a file
🗑
|
||||
show | fclose()
🗑
|
||||
What is the return type open() method? | show 🗑
|
||||
show | Text
🗑
|
||||
show | reading a file
🗑
|
||||
Which of the following header file is required for creating and reading files? | show 🗑
|
||||
Which stream class is used to BOTH read and write on files | show 🗑
|
||||
show | ofstream
🗑
|
||||
show | File
🗑
|
||||
show | <fstream>
🗑
|
||||
When will the cin can start processing of input? | show 🗑
|
||||
It represents a sequence of bytes on the disk where a group of related data is stored. | show 🗑
|
||||
show | is_open
🗑
|
||||
Which of the following is used to create a stream that performs both input and output operations? | show 🗑
|
||||
File mode that opens a text in reading mode | show 🗑
|
||||
show | FILE *fp;
🗑
|
||||
show | w++
🗑
|
||||
Which of the following is a text file? | show 🗑
|
||||
show | Read contents of a file
🗑
|
||||
It specifies the purpose of opening the file. | show 🗑
|
Review the information in the table. When you are ready to quiz yourself you can hide individual columns or the entire table. Then you can click on the empty cells to reveal the answer. Try to recall what will be displayed before clicking the empty cell.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.
Normal Size Small Size show me how
Normal Size Small Size show me how
Created by:
Azarath