MCQ and Short Questions
MCQ and Short Questions
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>
Chapter 1
What programming language is primarily introduced in this course for GUI
applications?
A) Java
B) C#
C) Python
D) JavaScript
Answer: B) C#
Which of the following books is used in this course that focuses on event
processing?
A) "Programming Windows"
B) "Event Processing in Action"
C) "The Pragmatic Programmer"
D) "Design Patterns"
Answer: B) "Event Processing in Action"
What is the primary focus of the course?
A) Data structures
B) Event-driven programming concepts
C) Algorithms
D) Network programming
Answer: B) Event-driven programming concepts
Which of the following is NOT a prerequisite for this course?
A) C++ programming
B) Data structures
C) C# programming
D) None of the above
Answer: C) C# programming
What does the term "event-driven programming" primarily refer to?
A) Basic HTML
B) AJAX techniques
C) CSS styling
D) JavaScript frameworks
Answer: B) AJAX techniques
In the provided C++ example, what condition stops the loop?
Answer: The two main books are “Event Processing in Action,” which focuses on event
processing concepts, and “Windows Presentation Foundation Unleashed,” which is
about GUI development using WPF in C#.
Answer: A busy wait occurs when a program repeatedly checks for a condition to be
true, consuming CPU resources without performing any useful work. This can lead to
inefficiencies and wasted resources in event-driven applications.
What is the purpose of the f.good() check in the second example provided?
Answer: The f.good() check ensures that the file stream is in a good state for
reading. It verifies that the file was successfully opened and is ready for input
operations, preventing errors during file reading.