Deck 14: Files and Streams
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
Match between columns
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/42
العب
ملء الشاشة (f)
Deck 14: Files and Streams
1
The ____ class provides you with information about directories or folders.
A) Directory
B) File
C) Cabinet
D) Folder
A) Directory
B) File
C) Cabinet
D) Folder
A
2
A ____ is a collection of fields that contain data about an entity.
A) file
B) character
C) record
D) bit
A) file
B) character
C) record
D) bit
C
3
The File class is contained in the System.IOFile namespace.
False
4
When you copy data from a file on a storage device into RAM, you ____.
A) write to the file
B) read from the file
C) copy to the file
D) do not use streams
A) write to the file
B) read from the file
C) copy to the file
D) do not use streams
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
5
Most computer users organize their files into ____ or directories.
A) folders
B) bins
C) buckets
D) drawers
A) folders
B) bins
C) buckets
D) drawers
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
6
The ____ class contains methods that allow you to access information about files.
A) Cabinet
B) File
C) Directory
D) Folder
A) Cabinet
B) File
C) Directory
D) Folder
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
7
A CSV file contains values separated by semicolon delimiters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
8
A C# application ____ by creating an object and associating a stream of bytes with that object.
A) returns a file
B) closes a file
C) opens a file
D) removes a file
A) returns a file
B) closes a file
C) opens a file
D) removes a file
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
9
A data file is a ____ access file when each record is read in order of its position in the file.
A) sequential
B) random
C) dynamic
D) temporary
A) sequential
B) random
C) dynamic
D) temporary
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
10
Files exist on ____ storage devices, such as hard disks, USB drives, reels of magnetic tape, and optical discs.
A) temporary
B) volatile
C) soft
D) permanent
A) temporary
B) volatile
C) soft
D) permanent
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
11
When you store data in a computer file on a persistent storage device, you ____.
A) read from the file
B) use an input stream
C) write to the file
D) erase data from memory
A) read from the file
B) use an input stream
C) write to the file
D) erase data from memory
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
12
When you write a program and save it to a disk, you are using temporary storage.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
13
When a C# application ____, the file is no longer available to the application.
A) opens a file
B) returns a file
C) writes to a file
D) closes a file
A) opens a file
B) returns a file
C) writes to a file
D) closes a file
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
14
Because you can erase data from files, some programmers prefer the term ____ storage to permanent storage.
A) volatile
B) temporary
C) transit
D) persistent
A) volatile
B) temporary
C) transit
D) persistent
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
15
Files that store music or images are in ____ format.
A) data
B) binary
C) text
D) information
A) data
B) binary
C) text
D) information
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
16
A ____ is any one of the letters, numbers, or other special symbols (such as punctuation marks) that comprise data.
A) field
B) record
C) delimiter
D) character
A) field
B) record
C) delimiter
D) character
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
17
When data values in a program are stored in memory, they are lost when the program ends.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
18
The terms directory and folder are used synonymously to refer to an entity that is used to organize files.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
19
Permanent storage is ____.
A) volatile
B) temporal
C) nonvolatile
D) soft storage
A) volatile
B) temporal
C) nonvolatile
D) soft storage
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
20
When you write a C# program that stores a value in a variable, you are using temporary storage; the value you store is lost when the program ends or the computer loses power. This type of storage is ____.
A) volatile
B) nonvolatile
C) permanent
D) hard
A) volatile
B) nonvolatile
C) permanent
D) hard
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
21
Using a ____ in your programs refers to the bad programming practice of hardcoding numbers (unnamed, literal constants) in code without explanation.
A) constant
B) token
C) magic number
D) character set
A) constant
B) token
C) magic number
D) character set
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
22
The FileStream class has 15 overloaded constructors. What can you tell about the FileStream object named myFile , given the constructor below?
FileStream myFile =
new FileStream("SomeText.txt"), FileMode.Create,
FileAccess.Write);
FileStream myFile =
new FileStream("SomeText.txt"), FileMode.Create,
FileAccess.Write);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
23
____ is the process of converting objects into streams of bytes.
A) Deserialization
B) Normalization
C) Streaming
D) Serialization
A) Deserialization
B) Normalization
C) Streaming
D) Serialization
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
24
Write a program that prompts a user for a filename and tests the file's existence. If the file exists, display the file creation time. If it does not exist, display a message.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
25
Temporary storage is usually called computer memory or _________________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
26
What is a character?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
27
Some files are ____________________ that contain facts and figures, such as a payroll file that contains employee numbers, names, and salaries.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
28
A file's ____ holds the byte number of the next byte to be read.
A) token
B) file position pointer
C) magic number
D) record token
A) token
B) file position pointer
C) magic number
D) record token
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
29
The ____ method is a member of the String class; it takes a character delimiter parameter and separates a string into substrings at each occurrence of the delimiter.
A) Separate()
B) Split()
C) Delimit()
D) Substring()
A) Separate()
B) Split()
C) Delimit()
D) Substring()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
30
The set of all the characters used to represent data on a particular computer is that computer's ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
31
A program that reads from a sequential access data file creates a FileStream object, and then the FileStream object is passed to a StreamReader object's constructor. Once this has been done, the ReadLine() method can be used to retrieve one line at a time from the data file. Show the sequence of instructions that would create the FileStream and StreamReader needed to access a data file, and then read one line from the file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
32
When you produce screen output and accept keyboard input, you use the Console class, which provides access to which three standard streams?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
33
When you perform an input operation in an application, you can picture bytes flowing into your program from an input device through a ____, which functions as a pipeline or channel.
A) directory
B) stream
C) root
D) path
A) directory
B) stream
C) root
D) path
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
34
What are the disadvantages to writing data to a text file using tokens and delimiters as opposed to writing an entire object to a file at once?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
35
Sometimes it is necessary to process a sequential text file multiple times from the beginning during a program's execution. After the file is processed the first time, the file pointer is at the end of the file. How can you reread the file at this point?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
36
Describe some of the methods of the Directory class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
37
____ converts streams of bytes back into objects.
A) Deserialization
B) Serialization
C) Normalization
D) Denormalization
A) Deserialization
B) Serialization
C) Normalization
D) Denormalization
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
38
What is a record?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
39
Tossing a file into a drawer of a file cabinet without a folder is the equivalent of placing a file in the main or ____________________ of your storage device when storing computer files.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
40
Businesses store data in a relationship known as the data ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
41
Match between columns
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
42
How can you create a class whose objects can be written to and read from data files? Show an example.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck