Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 26
Q561:
Which API sets the mode for console input and output?
A. SetFileMode()
B. SetMode()
C. SetConsoleMode()
D. ModeConsole()
Correct Answer: C
Chapter: 26
Q562:
The SetConsoleMode function requires a console handle and
A. a color code
B. a permission mask
C. a mode flag
D. an error handler
Correct Answer: C
Chapter: 26
Q563:
The ENABLE_ECHO_INPUT flag causes characters to
A. be hidden from screen
B. be logged to file
C. be displayed as typed
D. be ignored
Correct Answer: C
Chapter: 26
Q564:
ENABLE_LINE_INPUT causes ReadConsole to return only after
A. a bell sound is triggered
B. a space is entered
C. a carriage return is entered
D. an EOF character is found
Correct Answer: C
Chapter: 26
Q565:
Which mode enables automatic handling of backspace and line feed?
A. ENABLE_DIRECT_INPUT
B. ENABLE_MANUAL_MODE
C. ENABLE_PROCESSED_INPUT
D. ENABLE_FILE_INPUT
Correct Answer: C
Chapter: 26
Q566:
Which mode processes characters like tab, carriage return, and backspace?
A. ENABLE_PROCESSED_OUTPUT
B. ENABLE_LINE_FEED_MODE
C. ENABLE_RAW_INPUT
D. ENABLE_WRITE_MODE
Correct Answer: A
Chapter: 26
Q567:
Line wrapping at end-of-line is handled by which mode?
A. ENABLE_WRAP_AT_EOL_OUTPUT
B. ENABLE_LINE_WRAP_MODE
C. ENABLE_NEWLINE_WRAP
D. ENABLE_STRING_WRAP
Correct Answer: A
Chapter: 26
Q568:
Which handle access right is required to use SetConsoleMode properly?
A. GENERIC_WRITE
B. GENERIC_READ
C. GENERIC_EXECUTE
D. GENERIC_DELETE
Correct Answer: A
Chapter: 26
Q569:
ReadConsole requires a handle with which type of access?
A. GENERIC_EXECUTE
B. GENERIC_READ
C. GENERIC_WRITE
D. GENERIC_ALL
Correct Answer: B
Chapter: 26
Q570:
The lpBuffer parameter in ReadConsole is used to
A. store handle name
B. store file path
C. receive console input characters
D. send error message
Correct Answer: C
Chapter: 26
Q571:
nNumberOfCharsToRead specifies
A. the buffer size in bytes
B. the file name to open
C. the number of characters to read
D. the number of times to call ReadConsole
Correct Answer: C
Chapter: 26
Q572:
The buffer in ReadConsole should be at least
A. nChars * sizeof(char)
B. nChars * 8
C. nChars * sizeof(TCHAR)
D. nChars * sizeof(int)
Correct Answer: C
Chapter: 26
Q573:
The parameter lpNumberOfCharsRead in ReadConsole stores
A. number of chars to skip
B. number of chars requested
C. number of chars read
D. number of chars written
Correct Answer: C
Chapter: 26
Q574:
lpReserved in ReadConsole can usually be
A. NULL
B. 1
D. CONSOLE_FLAG
Correct Answer: A
Chapter: 26
Q575:
The console in modern systems is derived from
A. virtual machines
B. BIOS panels
C. virtual terminals in mainframes
D. dual core setups
Correct Answer: C
Chapter: 26
Q576:
Console-based APIs use characters processed through
A. the network
B. the system cache
C. the current console mode
D. user permissions
Correct Answer: C
Chapter: 26
Q577:
SetConsoleMode is used to
A. define console layout
B. define console resolution
C. define input/output modes
D. define font size
Correct Answer: C
Chapter: 26
Q578:
The output screen buffer is affected by
A. ENABLE_PROCESSED_INPUT
B. ENABLE_LINE_INPUT
C. ENABLE_ECHO_INPUT
D. ENABLE_SCREEN_COPY
Correct Answer: C
Chapter: 26
Q579:
ENABLE_PROCESSED_OUTPUT handles
A. carriage return and formatting
B. process priority
C. change in console font
D. network delays
Correct Answer: A
Chapter: 26
Q580:
A handle to the console input buffer must have
A. GENERIC_WRITE access
B. GENERIC_EXECUTE access
C. GENERIC_READ access
D. GENERIC_READWRITE access
Correct Answer: C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now