Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q1121: The keyword "finally" is used to define the ________ in a termination handler.
  • A: guarded body
  • B: termination block
  • C: try block
  • D: catch block
View Answer
B

Q1122: When a thread leaves a guarded body normally, the termination block is ________.
  • A: executed
  • B: skipped
  • C: paused
  • D: restarted
View Answer
A

Q1123: Termination handlers cannot catch or handle the actual exception, they only ________.
  • A: clean up after control flow leaves
  • B: ignore errors
  • C: prevent exceptions
  • D: throw new exceptions
View Answer
A

Q1124: Termination handlers help programs become more ________.
  • A: efficient
  • B: robust
  • C: complex
  • D: unresponsive
View Answer
B

Q1125: Termination handlers simplify recovery from ________.
  • A: errors and exceptions
  • B: memory leaks
  • C: syntax errors
  • D: network failures
View Answer
A

Q1126: Termination handlers help ensure ________ and file locks are freed.
  • A: resources
  • B: memory
  • C: connections
  • D: variables
View Answer
A

Q1127: In the code, an invalid handle is checked by comparing with ________.
  • A: NULL
  • B: INVALID_HANDLE_VALUE
  • C: 0
  • D: -1
View Answer
B

Q1128: If the handle is invalid, the function ________ is called.
  • A: ReportError
  • B: ReportException
  • C: HandleException
  • D: LogError
View Answer
B

Q1129: GetFileSizeEx is used to retrieve the ________ of a file.
  • A: name
  • B: size
  • C: type
  • D: permissions
View Answer
B

Q1130: The condition fsize.HighPart > 0 indicates that the file is ________.
  • A: too small
  • B: too large
  • C: read-only
  • D: locked
View Answer
B

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now