System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 72
Q1481:
The return type of CreateFileMapping() function is _______.
A. Pointer
B. Handle
C. Integer
D. Boolean
Correct Answer:
B
Chapter: 72
Q1482:
What does hFile represent in the CreateFileMapping() function?
A. File path
B. Open handle to file
C. Security attributes
D. Size of the file
Correct Answer:
B
Chapter: 72
Q1483:
What value of hFile refers to the paging file?
A. INVALID_HANDLE_VALUE
B. NULL
C. 0xFFFFFFFF
D. -1
Correct Answer:
A
Chapter: 72
Q1484:
Which parameter in CreateFileMapping() allows the mapping object to be secured?
A. hFile
B. lpFileMappingAttributes
C. flProtect
D. lpName
Correct Answer:
B
Chapter: 72
Q1485:
The dwProtect parameter in CreateFileMapping() specifies _______.
A. File size
B. Mapping file access
C. Number of pages
D. Memory address
Correct Answer:
B
Chapter: 72
Q1486:
PAGE_READONLY protection means the page can only be _______ within the mapped region.
A. Read
B. Written
C. Executed
D. Deleted
Correct Answer:
A
Chapter: 72
Q1487:
PAGE_READWRITE protection requires hFile to have _______ access.
A. GENERIC_READ only
B. GENERIC_WRITE only
C. GENERIC_READ and GENERIC_WRITE
D. GENERIC_EXECUTE
Correct Answer:
C
Chapter: 72
Q1488:
PAGE_WRITECOPY means changes to the mapped region are written to _______.
A. Original file
B. Paging file
C. Temporary file
D. Cache
Correct Answer:
B
Chapter: 72
Q1489:
If dwMaximumSizeHigh and dwMaximumSizeLow are set to 0, the mapping size will be based on _______.
A. The current file size
B. The system page size
C. A default value
D. Zero size
Correct Answer:
B
Chapter: 72
Q1490:
What happens if you try to create a mapping on a zero-length file?
A. It succeeds
B. It fails
C. It maps to the paging file
D. It creates a default map
Correct Answer:
B
Chapter: 72
Q1491:
The size of the mapping object must be specified using _______ values.
A. One 64-bit
B. Two 32-bit
C. Four 16-bit
D. One 32-bit
Correct Answer:
B
Chapter: 72
Q1492:
lpName parameter in CreateFileMapping() specifies the _______ of the map.
A. Size
B. Name
C. Security level
D. Protection level
Correct Answer:
B
Chapter: 72
Q1493:
Setting lpName to NULL means the map _______.
A. Is shared
B. Is not shared
C. Is read-only
D. Has full access
Correct Answer:
B
Chapter: 72
Q1494:
Once the size of a mapping object is assigned, it can _______.
A. Grow automatically
B. Shrink only
C. Not grow
D. Grow and shrink
Correct Answer:
B
Chapter: 72
Q1495:
File mapping objects are created using the handle of an _______ file.
A. Open
B. Closed
C. Temporary
D. Deleted
Correct Answer:
A
Chapter: 72
Q1496:
File mapping objects assigned names are available to _______.
A. Other threads
B. Other processes
C. Only current process
D. System services
Correct Answer:
B
Chapter: 72
Q1497:
CreateFileMapping() is used for _______ file IO operations.
A. Direct
B. Memory mapped
C. Buffered
D. Asynchronous
Correct Answer:
B
Chapter: 73
Q1498:
Which API is used to open an existing file mapping object?
A. OpenFileMapping()
B. CreateFileMapping()
C. CloseHandle()
D. ReadFile()
Correct Answer:
A
Chapter: 73
Q1499:
How many arguments does the OpenFileMapping() function take?
A. 2
B. 3
C. 4
D. 5
Correct Answer:
B
Chapter: 73
Q1500:
What is the return type of OpenFileMapping()?
A. Integer
B. Pointer
C. Handle
D. Boolean
Correct Answer:
C