System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q481: The program closes file handles using _______.
- A: CloseFile
- B: CloseHandle
- C: DeleteFile
- D: FreeHandle
View Answer
B
Q482: If encryption fails, the program calls the function ReportError with a _______ message.
- A: Success
- B: Error
- C: Warning
- D: Information
View Answer
B
Q483: The value of shift is converted to type _______ before usage in the encryption loop.
- A: DWORD
- B: BYTE
- C: INT
- D: CHAR
View Answer
B
Q484: The shift value in the program is passed as a _______ parameter from the command line.
- A: String
- B: DWORD
- C: CHAR
- D: BOOL
View Answer
C
Q485: The encryption algorithm here is a variant of Caesar Cipher adapted to work on _______.
- A: Alphabets
- B: ASCII characters
- C: Binary data
- D: Unicode characters
View Answer
B
Q486: The program expects exactly _______ command line arguments including program name.
- A: 2
- B: 3
- C: 4
- D: 5
View Answer
C
Q487: If the program is run without the correct number of arguments, it displays a _______.
- A: Help message
- B: Error message
- C: Success message
- D: Warning message
View Answer
B
Q488: Which function converts the shift parameter from string to integer?
- A: atoi
- B: _ttoi
- C: strtol
- D: strcmp
View Answer
B
Q489: What happens if CreateFile fails to open the output file?
- A: Input file handle is closed and FALSE returned
- B: Output file is created anyway
- C: Error message is displayed
- D: Program exits with success
View Answer
A
Q490: Which Windows API is used to delete a file?
- A: DeleteFile
- B: CopyFile
- C: MoveFile
- D: RemoveFile
View Answer
A