System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q451: Which Windows API function is used to write data to the output handle in CatFile?
- A: ReadFile
- B: WriteFile
- C: CloseHandle
- D: CreateFile
View Answer
B
Q452: The CatFile function continues copying while ReadFile returns data and WriteFile _______.
- A: receives data
- B: returns success
- C: returns failure
- D: returns zero
View Answer
B
Q453: In the Options() function, the _memtchr function checks for the presence of option characters in _______.
- A: Command line arguments
- B: Environment variables
- C: Files
- D: Program code
View Answer
A
Q454: The variable iFlag in Options() function is used to iterate over _______.
- A: Command line arguments
- B: Option string
- C: Files
- D: Flags
View Answer
B
Q455: Which keyword is used to define CatFile as accessible only within the source file?
- A: static
- B: extern
- C: volatile
- D: inline
View Answer
A
Q456: What type is the buffer array declared as in CatFile function?
- A: BYTE
- B: DWORD
- C: CHAR
- D: LPSTR
View Answer
A
Q457: The function _tcslen() used in Options() returns the length of a _______.
- A: String
- B: Buffer
- C: Flag
- D: Handle
View Answer
A
Q458: In the context of this program, HANDLE represents a _______.
- A: File descriptor
- B: Memory address
- C: Network socket
- D: Variable pointer
View Answer
A
Q459: Which variable in CatFile stores the number of bytes read from input file?
- A: nIn
- B: nOut
- C: BUF_SIZE
- D: hInFile
View Answer
A
Q460: Which variable in CatFile stores the number of bytes written to output file?
- A: nIn
- B: nOut
- C: BUF_SIZE
- D: hOutFile
View Answer
B