System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q1511: OpenFileMapping() fails if lpMapName is set to _______.
- A: NULL
- B: An empty string
- C: Valid map name
- D: A invalid name
View Answer
D
Q1512: The OpenFileMapping() function requires the map name to be previously _______.
- A: Deleted
- B: Created
- C: Closed
- D: Encrypted
View Answer
B
Q1513: Which API is used to map a file mapping object into the process address space?
- A: MapViewOfFile()
- B: CreateFileMapping()
- C: OpenFileMapping()
- D: HeapAlloc()
View Answer
A
Q1514: How many arguments does the MapViewOfFile() function take?
- A: 4
- B: 5
- C: 6
- D: 3
View Answer
B
Q1515: What does MapViewOfFile() return on success?
- A: Pointer to file mapping
- B: NULL
- C: Handle
- D: Integer
View Answer
A
Q1516: If MapViewOfFile() fails, it returns _______.
- A: NULL
- B: -1
- C: 0
- D: 1
View Answer
A
Q1517: The parameter hFileMappingObject in MapViewOfFile() is obtained from _______.
- A: CreateFileMapping()
- B: OpenFileMapping()
- C: HeapAlloc()
- D: FlushViewOfFile()
View Answer
A
Q1518: Which flag is NOT a valid dwDesiredAccess option for MapViewOfFile()?
- A: FILE_MAP_WRITE
- B: FILE_MAP_READ
- C: FILE_MAP_EXECUTE
- D: FILE_MAP_ALL_ACCESS
View Answer
C
Q1519: dwFileOffsetHigh and dwFileOffsetLow parameters specify the starting address of the mapping in multiples of _______.
- A: 4K
- B: 64K
- C: 1MB
- D: 512 bytes
View Answer
B
Q1520: Which API is used to unmap a mapped file view?
- A: HeapFree()
- B: UnmapViewOfFile()
- C: CloseHandle()
- D: FlushViewOfFile()
View Answer
B