0% found this document useful (0 votes)
3 views4 pages

Event Driven Programming

The document is a quiz on event-driven programming, covering key concepts such as event handling, event listeners, and the role of user interaction in applications. It includes multiple-choice questions that test understanding of events, event handlers, and the significance of event-driven programming in modern applications. The correct answers emphasize the importance of responsiveness and interactivity in software design.

Uploaded by

coprints.ps
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

Event Driven Programming

The document is a quiz on event-driven programming, covering key concepts such as event handling, event listeners, and the role of user interaction in applications. It includes multiple-choice questions that test understanding of events, event handlers, and the significance of event-driven programming in modern applications. The correct answers emphasize the importance of responsiveness and interactivity in software design.

Uploaded by

coprints.ps
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Event Driven Programming

Quiz

1. What is the main idea behind event-driven programming?


A. Programs run only once
B. Programs respond to user or system actions
C. Programs ignore user interaction
D. Programs only process numbers
Answer: B

2. Which of the following is considered an event?


A. Clicking a button
B. Saving electricity
C. Installing RAM
D. Formatting a disk
Answer: A

3. In graphical user interfaces, a button click usually triggers a:


A. Compiler
B. Variable
C. Event handler
D. Database
Answer: C

4. What is the purpose of an event handler?


A. To design hardware
B. To respond to a specific event
C. To create operating systems
D. To compress files
Answer: B

5. Which component listens for events and distributes them?


A. Event loop
B. Printer
C. Spreadsheet
D. Folder
Answer: A
6. Which programming environment commonly uses event-driven programming?
A. GUI applications
B. Assembly bootloaders only
C. BIOS firmware only
D. Disk partition tools only
Answer: A

7. Which event occurs when a key is pressed on the keyboard?


A. Mouse event
B. Keyboard event
C. Timer event
D. Network event
Answer: B

8. What usually happens when no event occurs in an event-driven program?


A. The program automatically shuts down
B. The program waits for events
C. The program deletes memory
D. The program installs drivers
Answer: B

9. Which of the following is an example of a mouse event?


A. KeyPress
B. Hover
C. Compile
D. Encrypt
Answer: B

10. Which statement BEST describes an event listener?


A. It creates hardware signals
B. It monitors and waits for events
C. It removes program errors
D. It stores passwords
Answer: B

11. In event-driven programming, the user interface is commonly called the:


A. GUI
B. CPU
C. ROM
D. BIOS
Answer: A

12. Which event may occur automatically after a specific interval?


A. Timer event
B. Mouse click
C. Typing event
D. Shutdown event
Answer: A

13. What will MOST likely happen if a button has no event handler?
A. The computer restarts
B. Nothing happens when clicked
C. The screen turns off
D. The RAM doubles
Answer: B

14. Which of the following is NOT commonly associated with event-driven


programming?
A. User interaction
B. Callbacks
C. Event handlers
D. Manual memory soldering
Answer: D

15. Which structure repeatedly checks for incoming events?


A. Event loop
B. Variable loop
C. Compiler loop
D. Arithmetic loop
Answer: A

16. A callback function is usually executed:


A. Before the program starts
B. When a related event occurs
C. After deleting the application
D. During hardware repair
Answer: B

17. Which application MOST likely uses event-driven programming?


A. Calculator app
B. Hammer
C. USB cable
D. Monitor stand
Answer: A

18. What type of programming is heavily used in mobile applications?


A. Event-driven programming
B. Machine language only
C. Binary-only programming
D. Mechanical programming
Answer: A

19. Which event can be triggered without user interaction?


A. Timer event
B. Mouse click
C. Keyboard press
D. Double-click
Answer: A

20. Why is event-driven programming useful in modern applications?


A. It reduces all hardware costs
B. It allows responsive and interactive applications
C. It removes the need for coding
D. It permanently increases RAM
Answer: B

You might also like