System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 58
Q1181:
controlfp modifies the behavior of _______ exceptions.
A. logical
B. syntax
C. memory
D. floating-point
Correct Answer:
D
Chapter: 58
Q1182:
The handler uses a filter function to treat each exception _______.
A. similarly
B. differently
C. rarely
D. once
Correct Answer:
B
Chapter: 58
Q1183:
eCategory plays a crucial role in identifying _______ of exception.
A. severity
B. source
C. type
D. message
Correct Answer:
C
Chapter: 58
Q1184:
The output of a masking operation is checked for _______ to determine an exception.
A. 1
B. 1
C. zero
D. undefined
Correct Answer:
C
Chapter: 58
Q1185:
eCategory is passed as a _______ to the handler.
A. value
B. pointer
C. struct
D. reference
Correct Answer:
D
Chapter: 58
Q1186:
Each exception type can be handled differently by using:
A. catch chains
B. filter function
C. switch selector
D. type guards
Correct Answer:
B
Chapter: 59
Q1187:
Console control handlers are similar to which mechanism?
A. Event listeners
B. Exception handlers
C. Interrupt routines
D. Signal processors
Correct Answer:
B
Chapter: 59
Q1188:
Which function is used to add a console control handler?
A. SetHandlerRoutine()
B. AddConsoleHandler()
C. SetConsoleCtrlHandler()
D. HandleConsoleEvent()
Correct Answer:
C
Chapter: 59
Q1189:
SetConsoleCtrlHandler() takes how many parameters?
A. One
B. Two
C. Three
D. Four
Correct Answer:
B
Chapter: 59
Q1190:
The first parameter of SetConsoleCtrlHandler() is the _______.
A. DWORD type signal
B. Handler function address
C. Boolean type value
D. String message
Correct Answer:
A
Chapter: 59
Q1191:
Setting HandlerRoutine to NULL and Add to TRUE will ______ Ctrl-C.
A. enable
B. ignore
C. disable
D. trigger
Correct Answer:
B
Chapter: 59
Q1192:
The second parameter of SetConsoleCtrlHandler() is a _______.
A. character
B. flag
C. Boolean value
D. void pointer
Correct Answer:
C
Chapter: 59
Q1193:
What will happen if SetConsoleCtrlHandler() fails?
A. Compiler halts
B. Event re-triggers
C. Nothing happens
D. Handler not set
Correct Answer:
D
Chapter: 59
Q1194:
The return type of HandlerRoutine should be _______.
A. int
B. void
C. BOOL
D. char
Correct Answer:
C
Chapter: 59
Q1195:
What is the data type of the parameter in HandlerRoutine()?
A. BOOL
B. DWORD
C. VOID
D. INT
Correct Answer:
B
Chapter: 59
Q1196:
Which constant represents a Ctrl-C event?
A. CTRL_CLOSE_EVENT
B. CTRL_LOGOFF_EVENT
C. CTRL_C_EVENT
D. CTRL_BREAK_EVENT
Correct Answer:
C
Chapter: 59
Q1197:
CTRL_CLOSE_EVENT indicates that the _______.
A. user logged off
B. console is closing
C. Ctrl-Break pressed
D. user shut down system
Correct Answer:
B
Chapter: 59
Q1198:
CTRL_LOGOFF_EVENT is triggered when the user attempts to _______.
A. shut down
B. system crash
C. log off
D. close window
Correct Answer:
C
Chapter: 59
Q1199:
If HandlerRoutine returns FALSE, what happens?
A. System reboots
B. Exception occurs
C. Next handler in chain is called
D. Program exits
Correct Answer:
C
Chapter: 59
Q1200:
Handler routines run in an independent _______.
A. process
B. block
C. thread
D. class
Correct Answer:
C