C Chapter 13
Quiz yourself by thinking what should be in
each of the black spaces below before clicking
on it to display the answer.
Help!
|
|
||||
---|---|---|---|---|---|
Getting information from a file is reffered to as "__________"? | show 🗑
|
||||
show | writing to the file
🗑
|
||||
show | output files
🗑
|
||||
Files that are read by the computer are called __ ___, because a program uses the information in these files as input. | show 🗑
|
||||
show | sequntial random binary
🗑
|
||||
show | file type
🗑
|
||||
The information in a ____ access file is always accessed in consecutive order from the beginning of the file through the end of the file. | show 🗑
|
||||
show | random
🗑
|
||||
The information in a ___ access file can be accessed by its byte location in the file. | show 🗑
|
||||
A ___ ___ __ is often referred to as a text file because it is composed of lines of text. | show 🗑
|
||||
show | cin
🗑
|
||||
The standard output stream object(____) refers to the computer screen. | show 🗑
|
||||
show | iostream
🗑
|
||||
show | fstream
🗑
|
||||
The fstream file contains the definitions of the ___ and ____ class, which allow you to create input and output file objects. | show 🗑
|
||||
In addition to the #include <fstream> directive, a program that creates an input file object also should include the ___? | show 🗑
|
||||
A program that creates an output file oject should include the ___ and ____ statements? | show 🗑
|
||||
show | in
🗑
|
||||
If the file you are creating is an output file, you're filename should start with(but doesn't have to) the letters "__". | show 🗑
|
||||
show | input = ifstream fileObject or output = ofstream fileObject
🗑
|
||||
show | open()
🗑
|
||||
What is the syntax for opening a sequential access file? | show 🗑
|
||||
show | mode
🗑
|
||||
The ios::__ mode is used to open a file for input, which allows the computer to read the data stored in the file. | show 🗑
|
||||
show | out app
🗑
|
||||
You use the ios::___ modes when you want to add data to the end of an existing file. | show 🗑
|
||||
show | out
🗑
|
||||
The two colons in each mode are called the __ __ ___ and indicate that the in, out, and app keywords are defined in the ios class. | show 🗑
|
||||
In C++ all files associated with an ifstream file object are opened automatically for input. TRUE/FALSE | show 🗑
|
||||
All objects in C++ are created from a class and are referred to as ___ of the class. | show 🗑
|
||||
show | in
🗑
|
||||
If you do not specify a mode when opening an output file, C++ uses the default mode ios:: __? | show 🗑
|
||||
In cases where the program needs to add data to the end of the existing data stored in an output file, you need to specify what mode? | show 🗑
|
||||
show | is_open()
🗑
|
||||
show | boolean
🗑
|
||||
The ! is the __ __ __ in C++ and its purpose is to reverse the truth-value of the condition. | show 🗑
|
||||
show | fileObject << date
🗑
|
||||
show | fields records
🗑
|
||||
A ___ is a single item of information about a person, place, or thing. Ex. name, salary, SIN, price. | show 🗑
|
||||
show | record
🗑
|
||||
To distinguish one record from another in the file, programmer typically write each record on a seperate line in the file. You do so by including the __ stream manipulator at the end of the statement. | show 🗑
|
||||
The endl stream manipulator writes an invisible character- referred to as the ___ character at the end of the record. | show 🗑
|
||||
When writing to a file a record that contains more than one field, programmer typically seperate each field with a character literal constant; ___ is most common. | show 🗑
|
||||
show | /n
🗑
|
||||
The __ function determines whether the last character in a file has been read. In other words it determines whether the file pointer is located after the last character in the file. | show 🗑
|
||||
show | close()
🗑
|
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:
darkskye