Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q2281: A handler in a process is used to _______ console control events.
  • A: catch
  • B: ignore
  • C: delete
  • D: duplicate
View Answer
A

Q2282: CreateProcess() with CREATE_NEW_PROCESS_GROUP flag creates a _______.
  • A: new thread
  • B: process group
  • C: console
  • D: session
View Answer
C

Q2283: A process group consists of the root process and _______.
  • A: all its child processes
  • B: only the root process
  • C: processes in other groups
  • D: threads
View Answer
B

Q2284: Which event can a process in a group generate to signal others?
  • A: CTRL_X_EVENT
  • B: CTRL_C_EVENT
  • C: CTRL_D_EVENT
  • D: CTRL_Z_EVENT
View Answer
B

Q2285: The function GenerateConsoleCtrlEvent() takes _______ as parameters.
  • A: dwCtrlEvent and dwProcessId
  • B: dwCtrlEvent and dwProcessGroupId
  • C: dwProcessId and dwThreadId
  • D: threadId and dwCtrlEvent
View Answer
B

Q2286: CTRL_BREAK_EVENT is a valid value for _______ parameter in GenerateConsoleCtrlEvent().
  • A: dwProcessGroupId
  • B: dwCtrlEvent
  • C: processId
  • D: threadId
View Answer
B

Q2287: The calling process cannot have its own console when generating an event if it uses _______ flag.
  • A: CREATE_NEW_PROCESS_GROUP
  • B: CREATE_NEW_CONSOLE
  • C: CREATE_NEW_THREAD
  • D: DETACHED_THREAD
View Answer
B

Q2288: The target process for GenerateConsoleCtrlEvent() must share the same _______ as the caller.
  • A: console
  • B: handle
  • C: process
  • D: id
View Answer
A

Q2289: GenerateConsoleCtrlEvent() can send which of the following events?
  • A: CTRL_C_EVENT and CTRL_BREAK_EVENT
  • B: CTRL_CLOSE_EVENT and CTRL_LOGOFF_EVENT
  • C: CTRL_LOGOFF_EVENT and CTRL_SHUTDOWN_EVENT
  • D: CTRL_SHUTDOWN_EVENT only
View Answer
A

Q2290: To terminate all processes in a process group, send a console control event to the _______.
  • A: root process group
  • B: individual processes
  • C: thread group
  • D: session group
View Answer
A

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now