System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q761: What structure stores the file header descriptor?
- A: RECORD
- B: HEADER
- C: OVERLAPPED
- D: SYSTEMTIME
View Answer
B
Q762: Which Windows API function reads data from a file into a buffer?
- A: WriteFile
- B: ReadFile
- C: CreateFile
- D: CloseHandle
View Answer
B
Q763: Which Windows API function writes data from a buffer to a file?
- A: WriteFile
- B: ReadFile
- C: CreateFile
- D: CloseHandle
View Answer
A
Q764: How does the program remove the newline character after reading input string?
- A: Using string[_tcslen(string)-1] = _T('\0');
- B: Using fgets()
- C: Using gets()
- D: Using strlen()
View Answer
A
Q765: What happens when writing a record for the first time (referenceCount == 0)?
- A: recordCreationTime is set to currentTime
- B: numNonEmptyRecords is decremented
- C: referenceCount remains zero
- D: recordUpdateTime is ignored
View Answer
A
Q766: Which variable holds the current file pointer position?
- A: currentPtr
- B: ov
- C: nXfer
- D: hFile
View Answer
A
Q767: If the recordChange flag is TRUE, what does the program do next?
- A: Write the updated record back to the file
- B: Deletes the record
- C: Reads a new record
- D: Closes the file
View Answer
A
Q768: Which of the following is NOT a valid command in this program?
- A: r
- B: w
- C: d
- D: x
View Answer
D
Q769: What does the OVERLAPPED structure 'ov' help manage?
- A: File position for asynchronous I/O
- B: Memory allocation
- C: Network communication
- D: Thread synchronization
View Answer
A
Q770: Which function is used to get the current system time?
- A: GetCurrentTime
- B: GetSystemTime
- C: GetLocalTime
- D: SetSystemTime
View Answer
B