Deck 8: Io Streams and Data Files

ملء الشاشة (f)
exit full mode
سؤال
Long filenames should be avoided because they take more time to type and can result in typing errors.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
When a program is executed, the standard input stream cin is connected to the standard input device.
سؤال
You must specify a C-string s maximum length in brackets immediately after it s declared.
سؤال
Current versions of UNIX allow 14 characters as the maximum filename length.
سؤال
The close() function takes one argument.
سؤال
A(n) ____ is a one-way transmission path between a source and a destination.

A) file
B) object
C) external name
D) stream
سؤال
In addition to the get() method, all input streams have a set() method for putting the last character read from an input stream back on the stream.
سؤال
A(n) ____ is a one-way transmission path used to connect a file stored on a physical device, such as a disk or CD, to a program.

A) file stream
B) external stream
C) stream name
D) file name
سؤال
Input file stream objects are declared to be of type ____.

A) istream
B) iofstream
C) ifstream
D) ofstream
سؤال
A ____ is a collection of data stored together under a common name, usually on a disk, magnetic tape, USB drive, or CD/DVD.

A) file
B) directory
C) database
D) file stream object
سؤال
Opening a file connects a file stream object to a specific external filename.
سؤال
The DOS operating system allows ____ characters plus an optional period and 3-character extension as the maximum filename length.

A) 4
B) 8
C) 16
D) 32
سؤال
All computer operating systems use the same specification as to the maximum number of characters permitted for an external filename.
سؤال
The ____ method returns a true value if a file was opened unsuccessfully or a false value if the open succeeded.

A) fail()
B) open()
C) test()
D) close()
سؤال
A file is a collection of data stored together under a common name, usually on a disk.
سؤال
C++ supports physical file objects.
سؤال
The Excel program adds the ____ extension automatically to all spreadsheet files.

A) .xla or .xls
B) .xls or .xlsx
C) .xcl or .xclx
D) .wpx or .wpxl
سؤال
Each file has a unique filename, referred to as the file s ____.

A) storage ID
B) external ID number
C) storage name
D) external name
سؤال
A file stream that sends or writes data to a file is an ____.

A) input file stream
B) output file stream
C) external file stream
D) internal file stream
سؤال
C++ compilers require a program file with the extension ____.

A) .c
B) .ccc
C) .cpp
D) .c++
سؤال
Output file streams can be formatted in the same manner as the ____ standard output stream.

A) cout
B) cin
C) ccout
D) fout
سؤال
In declaring and initializing a string variable for use in an open() method, the string is considered a ____.

A) string object
B) C-string
C) c_str
D) c-character
سؤال
The ____ functions return the file position marker s offset value.

A) offset()
B) where()
C) seek()
D) tell()
سؤال
The fstream class s ____ function permits character-by-character output to a stream.

A) getline()
B) get()
C) putline()
D) put()
سؤال
A(n) ____________________ filename is how the operating system knows the file.
سؤال
C and C++ append the low-value hexadecimal byte ____ as the end-of-file (EOF) sentinel when the file is closed.

A) 0x01
B) 0x10
C) 0x00
D) 0x11
سؤال
For file streams, the direction, or mode, is defined in relation to the ____________________ and not the file.
سؤال
A file stream that receives or reads data from a file to a program is a(n) ____________________ file stream.
سؤال
The ____ method breaks the connection between the file s external name and the file stream object.

A) open()
B) fail()
C) bad()
D) close()
سؤال
In ____, any character in the opened file can be read without having to sequentially read all characters stored ahead of it first.

A) sequential access
B) sequential organization
C) random access
D) random organization
سؤال
For each file your program uses, a distinct ____________________ stream object must be created.
سؤال
Two basic types of files exist: text files, and ____________________ files.
سؤال
You must check that the ____ method established a connection between a file stream and an external file successfully because this type of call is a request to the OS that can fail for various reasons.

A) connect()
B) conn()
C) open()
D) file()
سؤال
The ____ function is a request to the operating system to end program execution immediately.

A) end()
B) break()
C) terminate()
D) exit()
سؤال
All input streams have a ____ function for putting back the last character read from an input stream back on the stream.

A) put()
B) putback()
C) return()
D) sendback()
سؤال
A(n) ____ file object is a stream that connects a file of logically related data, such as a data file, to a program.

A) external
B) internal
C) physical
D) logical
سؤال
The term ____ refers to the process of retrieving data from a file.

A) file connection
B) file access
C) stream connection
D) stream access
سؤال
The fstream class s ____ function is used for character-by-character input from an input stream.

A) get()
B) getline()
C) getchar()
D) next()
سؤال
The term ____ refers to the way data is stored in a file.

A) file organization
B) file access
C) sequential access
D) database
سؤال
The standard error stream is represented by ____ in C and C++.

A) cin
B) cout
C) cerr
D) clog
سؤال
In C and C++, the ___________________ sentinel is never counted as part of the file.
سؤال
The standard log stream is represented by ____________________ in C and C++.
سؤال
The ____________________() methods allow the programmer to move to any position in a file.
سؤال
Reading data from a(n) ___________________-based file is almost identical to reading data from a standard keyboard.
سؤال
There are two types of file access: sequential access and ____________________ access.
سؤال
The ___________________() method returns a false value if the file was opened successfully.
سؤال
To understand file access types, first you need to understand how data is ____________________ in a file.
سؤال
In using ifstream and ofstream objects, the input or output mode is indicated by the ____________________.
سؤال
Using the seek() functions in random access, a(n) ____________________ offset means move forward in the file.
سؤال
A file stream object may be passed to a function as long as the function s formal parameter is defined as a(n) ____________________ to the appropriate stream.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 8: Io Streams and Data Files
1
Long filenames should be avoided because they take more time to type and can result in typing errors.
True
2
When a program is executed, the standard input stream cin is connected to the standard input device.
True
3
You must specify a C-string s maximum length in brackets immediately after it s declared.
True
4
Current versions of UNIX allow 14 characters as the maximum filename length.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
The close() function takes one argument.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
A(n) ____ is a one-way transmission path between a source and a destination.

A) file
B) object
C) external name
D) stream
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
In addition to the get() method, all input streams have a set() method for putting the last character read from an input stream back on the stream.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
A(n) ____ is a one-way transmission path used to connect a file stored on a physical device, such as a disk or CD, to a program.

A) file stream
B) external stream
C) stream name
D) file name
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
Input file stream objects are declared to be of type ____.

A) istream
B) iofstream
C) ifstream
D) ofstream
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
A ____ is a collection of data stored together under a common name, usually on a disk, magnetic tape, USB drive, or CD/DVD.

A) file
B) directory
C) database
D) file stream object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
Opening a file connects a file stream object to a specific external filename.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
The DOS operating system allows ____ characters plus an optional period and 3-character extension as the maximum filename length.

A) 4
B) 8
C) 16
D) 32
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
All computer operating systems use the same specification as to the maximum number of characters permitted for an external filename.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
The ____ method returns a true value if a file was opened unsuccessfully or a false value if the open succeeded.

A) fail()
B) open()
C) test()
D) close()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
A file is a collection of data stored together under a common name, usually on a disk.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
C++ supports physical file objects.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
The Excel program adds the ____ extension automatically to all spreadsheet files.

A) .xla or .xls
B) .xls or .xlsx
C) .xcl or .xclx
D) .wpx or .wpxl
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
Each file has a unique filename, referred to as the file s ____.

A) storage ID
B) external ID number
C) storage name
D) external name
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
A file stream that sends or writes data to a file is an ____.

A) input file stream
B) output file stream
C) external file stream
D) internal file stream
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
C++ compilers require a program file with the extension ____.

A) .c
B) .ccc
C) .cpp
D) .c++
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
Output file streams can be formatted in the same manner as the ____ standard output stream.

A) cout
B) cin
C) ccout
D) fout
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
In declaring and initializing a string variable for use in an open() method, the string is considered a ____.

A) string object
B) C-string
C) c_str
D) c-character
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
The ____ functions return the file position marker s offset value.

A) offset()
B) where()
C) seek()
D) tell()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
The fstream class s ____ function permits character-by-character output to a stream.

A) getline()
B) get()
C) putline()
D) put()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
A(n) ____________________ filename is how the operating system knows the file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
C and C++ append the low-value hexadecimal byte ____ as the end-of-file (EOF) sentinel when the file is closed.

A) 0x01
B) 0x10
C) 0x00
D) 0x11
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
For file streams, the direction, or mode, is defined in relation to the ____________________ and not the file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
A file stream that receives or reads data from a file to a program is a(n) ____________________ file stream.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
The ____ method breaks the connection between the file s external name and the file stream object.

A) open()
B) fail()
C) bad()
D) close()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
In ____, any character in the opened file can be read without having to sequentially read all characters stored ahead of it first.

A) sequential access
B) sequential organization
C) random access
D) random organization
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
For each file your program uses, a distinct ____________________ stream object must be created.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
Two basic types of files exist: text files, and ____________________ files.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
You must check that the ____ method established a connection between a file stream and an external file successfully because this type of call is a request to the OS that can fail for various reasons.

A) connect()
B) conn()
C) open()
D) file()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
The ____ function is a request to the operating system to end program execution immediately.

A) end()
B) break()
C) terminate()
D) exit()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
All input streams have a ____ function for putting back the last character read from an input stream back on the stream.

A) put()
B) putback()
C) return()
D) sendback()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
A(n) ____ file object is a stream that connects a file of logically related data, such as a data file, to a program.

A) external
B) internal
C) physical
D) logical
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
The term ____ refers to the process of retrieving data from a file.

A) file connection
B) file access
C) stream connection
D) stream access
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
The fstream class s ____ function is used for character-by-character input from an input stream.

A) get()
B) getline()
C) getchar()
D) next()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
The term ____ refers to the way data is stored in a file.

A) file organization
B) file access
C) sequential access
D) database
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
The standard error stream is represented by ____ in C and C++.

A) cin
B) cout
C) cerr
D) clog
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
In C and C++, the ___________________ sentinel is never counted as part of the file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
The standard log stream is represented by ____________________ in C and C++.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
The ____________________() methods allow the programmer to move to any position in a file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
Reading data from a(n) ___________________-based file is almost identical to reading data from a standard keyboard.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
There are two types of file access: sequential access and ____________________ access.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
The ___________________() method returns a false value if the file was opened successfully.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
To understand file access types, first you need to understand how data is ____________________ in a file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
In using ifstream and ofstream objects, the input or output mode is indicated by the ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
Using the seek() functions in random access, a(n) ____________________ offset means move forward in the file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
A file stream object may be passed to a function as long as the function s formal parameter is defined as a(n) ____________________ to the appropriate stream.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.