System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q901: LockFileEx and UnlockFileEx functions have ________ parameter lists.
- A: Different
- B: Highly similar
- C: Completely different
- D: No parameters
View Answer
B
Q902: In LockFileEx, the parameter lpOverlapped is a pointer to a(n) ________.
- A: OVERLAPPED structure
- B: FILE descriptor
- C: MEMORY buffer
- D: LOCK flag
View Answer
A
Q903: The function LockFileEx is defined in Windows to control file ________.
- A: Locking
- B: Opening
- C: Closing
- D: Deleting
View Answer
A
Q904: LockFileEx returns TRUE if the lock operation ________.
- A: succeeds
- B: fails
- C: raises an error
- D: blocks
View Answer
A
Q905: The DWORD data type in LockFileEx is used to represent a ________.
- A: 32-bit unsigned integer
- B: 16-bit integer
- C: Character string
- D: Boolean value
View Answer
A
Q906: Locks should be released ________ the usage is completed.
- A: before
- B: after
- C: during
- D: the next day
View Answer
B
Q907: Holding a file lock longer than necessary can negatively impact ________.
- A: system security
- B: user performance
- C: other programs' performance
- D: network speed
View Answer
C
Q908: Which of the following is a consequence of not releasing file locks promptly?
- A: Improved speed
- B: Blocked programs
- C: More memory
- D: Less disk space
View Answer
B
Q909: Programs should be designed to release locks using ________.
- A: appropriate functions
- B: hardware devices
- C: user input
- D: special hardware
View Answer
A
Q910: The main reason for releasing file locks quickly is to avoid ________.
- A: system crashes
- B: program blocking
- C: data corruption
- D: unnecessary delays
View Answer
D