Difficulty: Easy
Correct Answer: Correct (Windows uses an event/message-driven model)
Explanation:
Introduction / Context:
Modern operating systems and GUIs typically use an event-driven programming model. In Microsoft Windows, applications process a message loop, handling events such as keystrokes, mouse clicks, window resizing, timers, and inter-process notifications. This question checks whether you recognize Windows’ event-driven paradigm.
Given Data / Assumptions:
Concept / Approach:
Event-driven programming reacts to notifications rather than polling continuously. The OS and frameworks deliver events; the application registers handlers (callbacks, delegates) to respond. This yields responsive UIs and efficient resource usage, as code runs on demand when input or state changes occur.
Step-by-Step Solution:
Verification / Alternative check:
Inspect sample WinForms/WPF apps where UI logic resides in event handlers; the app is idle outside of events.
Why Other Options Are Wrong:
Common Pitfalls:
Blocking the UI thread and starving the message pump; failing to offload long operations; not unsubscribing handlers leading to leaks.
Final Answer:
Correct (Windows uses an event/message-driven model)
Discussion & Comments