Desktop Application Desktop Application MCQ 5 — Questions and Answers
Question 1: What is the purpose of the 'manifest file' (app.manifest) in a Windows desktop application?
- To list all source files for compilation
- To declare required permissions, DPI awareness, runtime dependencies, and UAC execution level (Correct answer)
- To store the application's icon resources
- To configure the database connection string
Correct answer: To declare required permissions, DPI awareness, runtime dependencies, and UAC execution level
The application manifest declares metadata like required execution level (UAC), DPI awareness settings, and compatible Windows versions.
Question 2: Which approach is used to prevent UI freezing when performing a long-running operation in a desktop application?
- Increase the application's thread priority
- Run the operation on a background thread and update the UI on the main thread (Correct answer)
- Use a faster algorithm in the UI event handler
- Disable UI elements during the operation
Correct answer: Run the operation on a background thread and update the UI on the main thread
Long operations should run on a background thread so the UI thread remains free to process user input and repaints, preventing the frozen 'not responding' state.
Question 3: In desktop application testing, what is 'UI automation testing'?
- Testing that the application's graphics driver is installed correctly
- Programmatically driving the application's UI controls to simulate user interactions and verify behavior (Correct answer)
- Automatically generating UI layouts based on test data
- Testing network latency from the user's desktop
Correct answer: Programmatically driving the application's UI controls to simulate user interactions and verify behavior
UI automation testing uses tools like WinAppDriver, Appium, or Sikuli to programmatically click buttons, enter text, and assert UI state as a real user would.
Question 4: What is 'portable' mode for a desktop application?
- The app can only run on laptops
- The app runs without installation, storing all settings relative to its own directory (Correct answer)
- The app has been ported from mobile to desktop
- The app can be run from any network share
Correct answer: The app runs without installation, storing all settings relative to its own directory
A portable app requires no installation and stores all configuration files in its own directory, allowing it to run directly from a USB drive or any folder.
Question 5: What does 'graceful degradation' mean for a desktop application?
- The app automatically reduces its visual quality on slower hardware
- The app continues to function with reduced features when a dependency or service is unavailable (Correct answer)
- The app degrades performance intentionally to save battery
- The app migrates data to a newer format automatically
Correct answer: The app continues to function with reduced features when a dependency or service is unavailable
Graceful degradation means the application continues to provide core functionality even when optional dependencies, features, or network services are unavailable.
Question 6: Which accessibility standard do desktop applications commonly implement to support screen readers?
- ARIA (Accessible Rich Internet Applications)
- UI Automation (UIA) or MSAA on Windows (Correct answer)
- WCAG 2.1 AA
- Section 508 HTML guidelines
Correct answer: UI Automation (UIA) or MSAA on Windows
Microsoft UI Automation (UIA) and its predecessor MSAA (Microsoft Active Accessibility) are the standard APIs that desktop apps implement so screen readers like NVDA and JAWS can read UI elements.
Question 7: What is 'dependency injection' used for in desktop application architecture?
- Injecting SQL queries into a database at runtime
- Providing objects with their required dependencies from outside rather than creating them internally, improving testability and flexibility (Correct answer)
- Loading DLL files dynamically at startup
- Injecting advertisements into the application UI
Correct answer: Providing objects with their required dependencies from outside rather than creating them internally, improving testability and flexibility
Dependency injection passes dependencies (like services or repositories) into a class from outside, decoupling components and making them easier to test and swap.
What is the purpose of the 'manifest file' (app.manifest) in a Windows desktop application?