System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q1481: The return type of CreateFileMapping() function is _______.
- A: Pointer
- B: Handle
- C: Integer
- D: Boolean
View Answer
B
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
View Answer
B
Q1483: What value of hFile refers to the paging file?
- A: INVALID_HANDLE_VALUE
- B: NULL
- C: 0xFFFFFFFF
- D: -1
View Answer
A
Q1484: Which parameter in CreateFileMapping() allows the mapping object to be secured?
- A: hFile
- B: lpFileMappingAttributes
- C: flProtect
- D: lpName
View Answer
B
Q1485: The dwProtect parameter in CreateFileMapping() specifies _______.
- A: File size
- B: Mapping file access
- C: Number of pages
- D: Memory address
View Answer
B
Q1486: PAGE_READONLY protection means the page can only be _______ within the mapped region.
- A: Read
- B: Written
- C: Executed
- D: Deleted
View Answer
A
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
View Answer
C
Q1488: PAGE_WRITECOPY means changes to the mapped region are written to _______.
- A: Original file
- B: Paging file
- C: Temporary file
- D: Cache
View Answer
B
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
View Answer
B
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
View Answer
B