System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 77
Q1561:
The data type used to store the key and data in the RECORD structure is ______.
A. TCHAR
B. INT
C. CHAR
D. FLOAT
Correct Answer:
A
Chapter: 77
Q1562:
The function used to create a file mapping object in Win32 is ______.
A. CreateFileMapping
B. OpenFileMapping
C. MapViewOfFile
D. CloseHandle
Correct Answer:
A
Chapter: 77
Q1563:
The function MapViewOfFile returns a pointer to the ______ of the mapped file.
A. memory view
B. file descriptor
C. file handle
D. offset
Correct Answer:
B
Chapter: 77
Q1564:
The size of the record in the program is defined by the macro ______.
A. REx:SIZE
B. REX_SIZE
C. REX.SIZE
D. REX_SIZE
Correct Answer:
A
Chapter: 77
Q1565:
The qsort function requires a ______ function defined by the programmer to compare records.
A. record sorting
B. record comparison
C. file reading
D. file writing
Correct Answer:
B
Chapter: 77
Q1566:
The temporary file used for sorting is deleted at the ______ of the program.
A. beginning
B. end
C. middle
D. after sorting
Correct Answer:
D
Chapter: 77
Q1567:
The sorting example assumes the key size is ______ bytes.
A. 4
B. 8
C. 16
D. 32
Correct Answer:
B
Chapter: 77
Q1568:
The sorted output is printed using the function ______.
A. _tprintf
B. printf
C. puts
D. puts_s
Correct Answer:
A
Chapter: 77
Q1569:
In the program, GetFileSizeEx is used to obtain the ______ of the file.
A. size
B. content
C. type
D. access rights
Correct Answer:
A
Chapter: 77
Q1570:
The program uses CopyFile to make a temporary file with the ______ content as the original.
A. exact
B. modified
C. encrypted
D. compressed
Correct Answer:
A
Chapter: 77
Q1571:
The sorting method used in the program is based on ______ access to data.
A. random
B. sequential
C. streaming
D. indexed
Correct Answer:
A
Chapter: 77
Q1572:
Exception and error handling in the sorting program are ______ in the listing but available in the full example.
A. included
B. omitted
C. required
D. optional
Correct Answer:
B
Chapter: 77
Q1573:
The program structure is described as ______ and straightforward.
A. complex
B. simple
C. unclear
D. verbose
Correct Answer:
B
Chapter: 77
Q1574:
The file mapping view is created by calling ______.
A. MapViewOfFile
B. CloseHandle
C. CreateFileMapping
D. OpenFileMapping
Correct Answer:
A
Chapter: 77
Q1575:
In the RECORD struct, the data field is named ______.
A. data
B. info
C. key
D. value
Correct Answer:
A
Chapter: 77
Q1576:
The sorting algorithm is applied directly on the file content via ______.
A. memory mapping
B. file stream
C. buffer
D. file descriptor
Correct Answer:
A
Chapter: 77
Q1577:
Deleting the temporary file at the end is done by calling ______.
A. DeleteFile
B. CloseHandle
C. RemoveFile
D. DeleteTempFile
Correct Answer:
A
Chapter: 78
Q1578:
File maps with pointers can become meaningless on remapping because pointers are relative to _______.
A. the virtual address returned by MapViewOfFile
B. a fixed memory address
C. the start of the disk file
D. the process stack
Correct Answer:
A
Chapter: 78
Q1579:
In file mapping, the solution to make pointers valid across mappings is to use _______.
A. absolute pointers
B. static pointers
C. based pointers
D. global pointers
Correct Answer:
C
Chapter: 78
Q1580:
The Microsoft C syntax for based pointers uses which keyword?
A. based
B. _relative
C. _based
D. _pointer
Correct Answer:
C