System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q1131: The logical OR (||) in if(!GetFileSizeEx(hIn, &fsize) || fsize.HighPart > 0) means the exception is reported if the file size is invalid or ________.
- A: too large
- B: too small
- C: missing
- D: read-only
View Answer
A
Q1132: The _T macro in _T("File is Too Large") is used for ________.
- A: string encoding
- B: error handling
- C: file locking
- D: debugging
View Answer
A
Q1133: Termination handlers run when the control flow leaves the guarded body normally or ________.
- A: abnormally
- B: after a delay
- C: only on error
- D: before function call
View Answer
A
Q1134: The function ReportException reports ________ detected during file operations.
- A: exceptions
- B: errors
- C: success messages
- D: warnings
View Answer
B
Q1135: If GetFileSizeEx fails, the program reports the file as ________.
- A: too large
- B: unreadable
- C: locked
- D: too small
View Answer
A
Q1136: The example code is written in ________ language.
- A: C/C++
- B: Python
- C: Java
- D: JavaScript
View Answer
A
Q1137: In robust programs, termination handlers reduce the risk of ________.
- A: resource leaks
- B: syntax errors
- C: memory allocation
- D: network delays
View Answer
A
Q1138: The variable fsize is a structure that holds the file size in ________ parts.
- A: one
- B: two
- C: three
- D: four
View Answer
B
Q1139: The check for (hin == INVALID_HANDLE_VALUE) is necessary to prevent ________.
- A: using invalid handles
- B: calling ReportException
- C: reading large files
- D: opening files
View Answer
A
Q1140: Termination handlers and exception handlers differ in that termination handlers execute on both normal and abnormal exits, while exception handlers only execute on ________.
- A: abnormal exits
- B: normal exits
- C: both
- D: none
View Answer
A