System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 59
Q1201:
The CTRL_BREAK_EVENT is triggered by which key sequence?
A. Ctrl+Alt
B. Alt+Break
C. Ctrl+Break
D. Shift+Ctrl
Correct Answer:
C
Chapter: 59
Q1202:
HandlerRoutine is triggered by a _______ exception.
A. network
B. console
C. thread
D. runtime
Correct Answer:
B
Chapter: 59
Q1203:
Signal applies to the ______, while exceptions apply to a single thread.
A. main thread
B. process
C. routine
D. object
Correct Answer:
B
Chapter: 59
Q1204:
Signal handlers are useful for performing ______ tasks.
A. debug
B. interrupt
C. cleanup
D. compilation
Correct Answer:
C
Chapter: 59
Q1205:
Handlers are invoked in which order?
A. Alphabetical
B. Stack order
C. Reverse setup order
D. Random order
Correct Answer:
C
Chapter: 59
Q1206:
The last handler in the chain is always the _______.
A. first handler
B. system handler
C. main program
D. handler thread
Correct Answer:
B
Chapter: 59
Q1207:
A TRUE return value from a signal handler indicates it has ______.
A. failed
B. ignored
C. completed the task
D. exited
Correct Answer:
C
Chapter: 59
Q1208:
The API SetConsoleCtrlHandler is part of which type of programming?
A. web
B. system console
C. web server
D. event-driven
Correct Answer:
B
Chapter: 59
Q1209:
The control handler mechanism helps to manage ______ console events.
A. keyboard-only
B. user-defined
C. system-related
D. loop-based
Correct Answer:
C
Chapter: 59
Q1210:
To ignore Ctrl-C, SetConsoleCtrlHandler must be called with ______.
A. NULL, FALSE
B. NULL, TRUE
C. TRUE, NULL
D. FALSE, TRUE
Correct Answer:
B
Chapter: 59
Q1211:
The type of signal handled by HandlerRoutine is identified by ______.
A. signalType
B. dwCtrlType
C. eventMask
D. controlFlag
Correct Answer:
B
Chapter: 59
Q1212:
The signal type passed to HandlerRoutine is of type ______.
A. BOOL
B. DWORD
C. INT
D. CHAR
Correct Answer:
B
Chapter: 59
Q1213:
The function prototype for a console control handler starts with which keyword?
A. INT
B. BOOL
C. VOID
D. CHAR
Correct Answer:
B
Chapter: 59
Q1214:
dwCtrlType helps identify the ______ that triggered the handler.
A. API
B. call
C. thread
D. signal
Correct Answer:
D
Chapter: 59
Q1215:
The order of handler execution is based on the order in which they are ______.
A. called
B. set up
C. declared
D. compiled
Correct Answer:
B
Chapter: 59
Q1216:
HandlerRoutine is capable of handling multiple ______ types.
A. thread
B. event
C. signal
D. process
Correct Answer:
C
Chapter: 59
Q1217:
The second parameter in SetConsoleCtrlHandler defines whether to ______ the handler.
A. remove
B. invoke
C. add
D. disable
Correct Answer:
C
Chapter: 59
Q1218:
The last fallback in the signal handler chain is the ______ handler.
A. process
B. default
C. system
D. thread
Correct Answer:
C
Chapter: 59
Q1219:
The CTRL_SHUTDOWN_EVENT is triggered when the user attempts to ______.
A. log off
B. close console
C. shut down the system
D. switch user
Correct Answer:
C
Chapter: 59
Q1220:
Console control handlers are useful when the application needs to ______ before shutdown.
A. execute calculations
B. do nothing
C. perform cleanup
D. exit loop
Correct Answer:
C