Desktop Application Desktop Application MCQ 4 — Questions and Answers
Question 1: What is the purpose of code signing a desktop application?
- To encrypt the application's source code
- To verify the publisher's identity and ensure the binary has not been tampered with (Correct answer)
- To register the application with the operating system
- To prevent the application from being uninstalled
Correct answer: To verify the publisher's identity and ensure the binary has not been tampered with
Code signing uses a digital certificate to verify the publisher's identity and guarantees the binary hasn't been altered since it was signed.
Question 2: In Electron.js desktop applications, what runs in the 'main process'?
- HTML rendering and JavaScript UI logic
- Node.js code that manages windows, OS integration, and app lifecycle (Correct answer)
- CSS styling for the application window
- The V8 JavaScript engine for DOM manipulation
Correct answer: Node.js code that manages windows, OS integration, and app lifecycle
The main process in Electron runs Node.js, controls the app lifecycle, creates BrowserWindow instances, and handles OS-level operations.
Question 3: What is 'auto-update' functionality in a desktop application?
- Automatically updating the UI theme based on user activity
- Checking for and installing new versions of the application without requiring manual download (Correct answer)
- Syncing application data to the cloud automatically
- Refreshing the window every few seconds
Correct answer: Checking for and installing new versions of the application without requiring manual download
Auto-update allows desktop apps to silently check for, download, and install newer versions in the background, keeping users on the latest release.
Question 4: Which Windows registry hive stores settings for the currently logged-in user in a desktop application?
- HKEY_LOCAL_MACHINE (HKLM)
- HKEY_CURRENT_USER (HKCU) (Correct answer)
- HKEY_CLASSES_ROOT (HKCR)
- HKEY_USERS (HKU)
Correct answer: HKEY_CURRENT_USER (HKCU)
HKEY_CURRENT_USER (HKCU) stores configuration and preferences for the currently logged-in user, separate from machine-wide settings.
Question 5: What is the difference between a modal and a modeless dialog in a desktop application?
- Modal dialogs are resizable; modeless dialogs are fixed size
- Modal dialogs block interaction with the parent window; modeless dialogs do not (Correct answer)
- Modal dialogs are always fullscreen; modeless dialogs are popup windows
- Modal dialogs save data automatically; modeless dialogs require manual saving
Correct answer: Modal dialogs block interaction with the parent window; modeless dialogs do not
A modal dialog blocks all input to the parent window until dismissed, while a modeless dialog allows the user to continue interacting with the parent window.
Question 6: In desktop application performance profiling, what does a 'hot path' refer to?
- Code that handles overheating CPU alerts
- The section of code that executes most frequently and consumes the most CPU time (Correct answer)
- The fastest network route for data transmission
- A code path that is only executed during startup
Correct answer: The section of code that executes most frequently and consumes the most CPU time
A hot path is the frequently executed code section that contributes most to CPU usage; optimizing it yields the greatest performance gains.
Question 7: What is 'virtual scrolling' (also called windowed rendering) used for in desktop applications with large lists?
- Scrolling content inside a virtual machine
- Rendering only the visible rows of a list instead of all rows to improve performance (Correct answer)
- Enabling touchpad gesture scrolling on Windows
- Caching scrolled content in GPU memory
Correct answer: Rendering only the visible rows of a list instead of all rows to improve performance
Virtual scrolling renders only the rows currently visible on screen, dramatically reducing memory usage and render time for lists with thousands of items.
What is the purpose of code signing a desktop application?