System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q1191: Setting HandlerRoutine to NULL and Add to TRUE will ______ Ctrl-C.
- A: enable
- B: ignore
- C: disable
- D: trigger
View Answer
B
Q1192: The second parameter of SetConsoleCtrlHandler() is a _______.
- A: character
- B: flag
- C: Boolean value
- D: void pointer
View Answer
C
Q1193: What will happen if SetConsoleCtrlHandler() fails?
- A: Compiler halts
- B: Event re-triggers
- C: Nothing happens
- D: Handler not set
View Answer
D
Q1194: The return type of HandlerRoutine should be _______.
- A: int
- B: void
- C: BOOL
- D: char
View Answer
C
Q1195: What is the data type of the parameter in HandlerRoutine()?
- A: BOOL
- B: DWORD
- C: VOID
- D: INT
View Answer
B
Q1196: Which constant represents a Ctrl-C event?
- A: CTRL_CLOSE_EVENT
- B: CTRL_LOGOFF_EVENT
- C: CTRL_C_EVENT
- D: CTRL_BREAK_EVENT
View Answer
C
Q1197: CTRL_CLOSE_EVENT indicates that the _______.
- A: user logged off
- B: console is closing
- C: Ctrl-Break pressed
- D: user shut down system
View Answer
B
Q1198: CTRL_LOGOFF_EVENT is triggered when the user attempts to _______.
- A: shut down
- B: system crash
- C: log off
- D: close window
View Answer
C
Q1199: If HandlerRoutine returns FALSE, what happens?
- A: System reboots
- B: Exception occurs
- C: Next handler in chain is called
- D: Program exits
View Answer
C
Q1200: Handler routines run in an independent _______.
- A: process
- B: block
- C: thread
- D: class
View Answer
C