Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q1521: The parameter lpBaseAddress in UnmapViewOfFile() is a pointer to the _______.
  • A: Base address of the mapped view
  • B: File handle
  • C: Heap block
  • D: Mapping object
View Answer
A

Q1522: Which API forces the OS to write back dirty pages of the file to disk?
  • A: FlushViewOfFile()
  • B: UnmapViewOfFile()
  • C: MapViewOfFile()
  • D: HeapFree()
View Answer
A

Q1523: If one process uses file mapping and another uses ReadFile()/WriteFile(), their views of the file may be _______.
  • A: Identical
  • B: Different
  • C: Encrypted
  • D: Unavailable
View Answer
B

Q1524: To maintain uniform file views across processes, all processes should use _______.
  • A: File mapping
  • B: ReadFile()
  • C: WriteFile()
  • D: Memory allocation
View Answer
A

Q1525: dwDesiredAccess in MapViewOfFile() must be compatible with _______.
  • A: HeapAlloc()
  • B: CreateFileMapping()
  • C: File permissions
  • D: File mapping object access rights
View Answer
D

Q1526: In Win32, the maximum size of a file that can be mapped is approximately _______.
  • A: 1-2 GB
  • B: 2-3 GB
  • C: 4-5 GB
  • D: 5-6 GB
View Answer
B

Q1527: Which Windows version alleviates the file mapping size limitation of Win32?
  • A: Win98
  • B: WinXP
  • C: Win64
  • D: WinNT
View Answer
C

Q1528: Before mapping a new file, you should set its length using _______ and SetEndOfFile().
  • A: SetFilePointerEx()
  • B: CreateFileMapping()
  • C: OpenFileMapping()
  • D: MapViewOfFile()
View Answer
A

Q1529: To map a file, which API functions can be used?
  • A: CreateFileMapping() or OpenFileMapping()
  • B: CloseHandle() or UnmapViewOfFile()
  • C: MapViewOfFile() or HeapAlloc()
  • D: SetFilePointerEx() or SetEndOfFile()
View Answer
A

Q1530: After mapping a file, access to file data is performed through _______.
  • A: File descriptors
  • B: File pointers
  • C: Memory references
  • D: File streams
View Answer
C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now