System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 5
Q161:
BOOL in Windows is used to store
A. an array
B. a string log
C. a logical value
D. a data handle
Correct Answer:
C
Chapter: 5
Q162:
LPTSTR data type refers to
A. Pointer to Boolean
B. Long Pointer to Zero terminated string
C. Character pointer
D. Windows error code
Correct Answer:
B
Chapter: 5
Q163:
Which of the following is NOT a Windows API data type?
A. BOOL
B. DWORD
C. HANDLE
D. INT
Correct Answer:
A
Chapter: 5
Q164:
Hungarian notation helps developers
A. Identify errors
B. Manage memory
C. Easily recognize data type of variables
D. Handle exceptions
Correct Answer:
C
Chapter: 5
Q165:
The prefix in variable ‘lpszName’ is used to
A. Decorate variable names
B. Enable Unicode
C. Identify variable type
D. Increase string length
Correct Answer:
C
Chapter: 5
Q166:
Which of the following is true for Windows APIs?
A. Do not require parameters
B. Work without headers
C. Allow object manipulation
D. Use numeric references
Correct Answer:
C
Chapter: 5
Q167:
windows.h file is used to include
A. Keyboard drivers
B. API prototypes and data types
C. Hardware configurations
D. Browser extensions
Correct Answer:
B
Chapter: 5
Q168:
In Windows OS, ______ are thrown when direct access to system objects is attempted
A. Exceptions
B. Errors
C. Warnings
D. Processes
Correct Answer:
A
Chapter: 5
Q169:
System resources in Windows such as memory and threads are accessed via
A. Direct referencing
B. Memory IDs
C. Handles
D. Function calls
Correct Answer:
C
Chapter: 5
Q170:
Windows APIs are used for
A. Device driver execution
B. Object access and manipulation
C. Web programming
D. Graphic rendering
Correct Answer:
B
Chapter: 5
Q171:
Every parameter in a Windows API
A. has no use
B. is optional
C. has a specific significance
D. is a string
Correct Answer:
C
Chapter: 5
Q172:
‘HANDLE’ in Windows API represents
A. Memory size
B. Pointer
C. Reference to object
D. Array ID
Correct Answer:
C
Chapter: 5
Q173:
Windows avoids the use of ______ operator in its data types
A. &
B. *
C. %
D. #
Correct Answer:
B
Chapter: 5
Q174:
Hungarian notation uses
A. Capital suffixes
B. Pointer names
C. Lowercase prefix letters
D. Data logs
Correct Answer:
C
Chapter: 5
Q175:
All Windows API prototypes and types are included through
A. #include <stdlib.h>
B. #include <windows.h>
C. #include <api.dll>
D. #include <kernel32.h>
Correct Answer:
B
Chapter: 5
Q176:
A Windows object can only be accessed through
A. Static function
B. Socket
C. Pipe
D. API
Correct Answer:
D
Chapter: 5
Q177:
When a thread accesses a Windows object incorrectly
A. Permission is granted
B. Windows allows it
C. Exception is thrown
D. Error is ignored
Correct Answer:
C
Chapter: 5
Q178:
To perform multithreading, Windows uses
A. Schedulers
B. Pipelines
C. Constructs for synchronization
D. Error handlers
Correct Answer:
C
Chapter: 5
Q179:
Windows APIs can manipulate
A. a single object in one way
B. a single object in multiple ways
C. only memory
D. external devices
Correct Answer:
B
Chapter: 5
Q180:
Synchronization constructs in Windows help
A. in threading and resource control
B. in GUI development
C. in pointer allocation
D. in variable naming
Correct Answer:
A