Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q261: The LPWSTR data type in Windows API stands for
  • A: Pointer to wide string
  • B: Long pointer to wide string
  • C: Wide character buffer
  • D: Handle to string
View Answer
B

Q262: If writing fails in the loop, what is printed?
  • A: Fatal read error
  • B: Fatal copy error
  • C: Fatal write error
  • D: None of these
View Answer
C

Q263: The memory for `lpwszFile1` and `lpwszFile2` is allocated using
  • A: new()
  • B: Calloc()
  • C: malloc()
  • D: GlobalAlloc()
View Answer
C

Q264: What Windows API function is used to close file handles?
  • A: CloseFile()
  • B: CloseHandle()
  • C: fclose()
  • D: ShutFile()
View Answer
B

Q265: ReadFile() and WriteFile() are functions provided by
  • A: Standard C
  • B: Windows API
  • C: POSIX
  • D: MS-DOS
View Answer
B

Q266: The file path arguments from command line are initially in
  • A: Unicode
  • B: Binary
  • C: ASCII
  • D: Hex
View Answer
C

Q267: The type of the variable used to store number of bytes read is
  • A: INT
  • B: CHAR
  • C: DWORD
  • D: float
View Answer
C

Q268: The handle for the output file is stored in
  • A: hOut
  • B: outFile
  • C: hOutput
  • D: output
View Answer
C

Q269: This program is written in which programming language?
  • A: Python
  • B: C
  • C: C++
  • D: Assembly
View Answer
B

Q270: A file is opened for reading using which mode in CreateFile()?
  • A: GENERIC_WRITE
  • B: GENERIC_EXECUTE
  • C: GENERIC_READ
  • D: GENERIC_APPEND
View Answer
C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now