System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 26
Q581:
In ReadConsole, which parameter can be NULL?
A. hConsoleInput
B. nNumberOfCharsToRead
C. lpReserved
D. lpBuffer
Correct Answer:
C
Chapter: 26
Q582:
The ENABLE_WRAP_AT_EOL_OUTPUT option enables
A. backspace deletion
B. text alignment
C. line wrapping
D. line trimming
Correct Answer:
C
Chapter: 26
Q583:
WriteConsole is used to
A. read files
B. write to disk
C. write to console input buffer
D. write to console output buffer
Correct Answer:
D
Chapter: 26
Q584:
ReadConsole reads input from
A. file
B. handle
C. user
D. thread
Correct Answer:
B
Chapter: 26
Q585:
SetConsoleMode is available in
A. UNIX only
B. Windows only
C. All major OS
D. Mobile OS
Correct Answer:
B
Chapter: 26
Q586:
The buffer in ReadConsole must be allocated by
A. the OS
B. the user beforehand
C. the file manager
D. the terminal driver
Correct Answer:
B
Chapter: 27
Q587:
What is the purpose of the PrintStrings() function?
A. To read from a file
B. To print a single string
C. To handle variable string outputs to console
D. To handle memory allocation
Correct Answer:
C
Chapter: 27
Q588:
Which C function is used to start processing a variable parameter list?
A. va_arg()
B. va_end()
C. va_start()
D. printf()
Correct Answer:
C
Chapter: 27
Q589:
Which header file is required to use va_list functions in C?
A. <stdio.h>
B. <conio.h>
C. <stdarg.h>
D. <consoleapi.h>
Correct Answer:
C
Chapter: 27
Q590:
The ConsolePrompt function is used to _______.
A. write to a file
B. receive input from console only
C. display a message only
D. display a message and receive input
Correct Answer:
A
Chapter: 27
Q591:
ConsolePrompt uses which API to display messages on the console?
A. ReadFile()
B. ReadConsole()
C. PrintStrings()
D. WriteConsole()
Correct Answer:
C
Chapter: 27
Q592:
What type of handle does CreateFile with "CONIN$" return?
A. Console output handle
B. Console input handle
C. File stream handle
D. File descriptor
Correct Answer:
B
Chapter: 27
Q593:
Which API replaces CR-LF with a null character in ConsolePrompt?
A. WriteConsole()
B. PrintStrings()
C. pResponse modification
D. WriteFile()
Correct Answer:
C
Chapter: 27
Q594:
Which function is responsible for writing variable strings to console?
A. ConsolePrompt()
B. PrintMsg()
C. PrintStrings()
D. WriteConsole()
Correct Answer:
C
Chapter: 27
Q595:
Which API is called inside PrintStrings if WriteConsole fails?
A. ReadConsole()
B. WriteFile()
C. ReadFile()
D. Printf()
Correct Answer:
B
Chapter: 27
Q596:
The va_end() function is used to _______.
A. initialize variable arguments
B. end processing variable arguments
C. read a string from user
D. write string to file
Correct Answer:
B
Chapter: 27
Q597:
The “echoFlag” in ConsolePrompt determines _______.
A. output stream mode
B. input buffer size
C. if input is visible on console
D. if response is in lowercase
Correct Answer:
C
Chapter: 27
Q598:
In ConsolePrompt, the input handle is created using
A. _T("CONOUT$")
B. _T("STDOUT")
C. _T("CONIN$")
D. _T("STDIN")
Correct Answer:
C
Chapter: 27
Q599:
To ensure input is echoed to the screen, which mode is enabled?
A. ENABLE_LINE_INPUT
B. ENABLE_ECHO_INPUT
C. ENABLE_WRAP_AT_EOL_OUTPUT
D. ENABLE_PROCESSED_INPUT
Correct Answer:
B
Chapter: 27
Q600:
ENABLE_PROCESSED_OUTPUT allows processing of ______.
A. Unicode characters
B. low-level input
C. escape sequences like tab and bell
D. network messages
Correct Answer:
C