System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q421: The ReportError() function uses which function to print to the standard error stream?
- A: _printf()
- B: _fprintf()
- C: _ftprintf()
- D: printf()
View Answer
C
Q422: The macro _T() is used in ReportError() to support _______.
- A: Unicode only
- B: ASCII only
- C: Generic text mappings
- D: Both ASCII and Unicode
View Answer
D
Q423: Which function converts the error code into a localized message string?
- A: GetLastError()
- B: FormatMessage()
- C: LocalFree()
- D: ExitProcess()
View Answer
B
Q424: What datatype is used for the printErrorMessage parameter?
- A: BOOL
- B: DWORD
- C: LPCTSTR
- D: int
View Answer
A
Q425: If eMsgLen <= 0, what will ReportError() print?
- A: User message only
- B: Error code only
- C: Both user message and error code
- D: Nothing
View Answer
B
Q426: How many standard IO devices are used in the operating system?
- A: 1
- B: 2
- C: 3
- D: 4
View Answer
C
Q427: Which of the following is NOT a standard IO device?
- A: Input
- B: Output
- C: Storage
- D: Error
View Answer
C
Q428: By default, the printf command sends output to the _______.
- A: standard input
- B: device file
- C: standard output
- D: device driver
View Answer
C
Q429: The getch function receives input from the _______.
- A: standard output
- B: standard input
- C: standard error
- D: console log
View Answer
B
Q430: What Windows data type is used to manipulate IO devices?
- A: Pointer
- B: HANDLE
- C: File
- D: Socket
View Answer
B