System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q661: What does `lDistanceToMove` represent in SetFilePointer()?
- A: Number of sectors
- B: 32-bit offset in bytes
- C: Error code
- D: File handle
View Answer
B
Q662: `lpDistanceToMoveHigh` is a pointer to the ______ of the 64-bit distance to move.
- A: file size
- B: high-order 32 bits
- C: low-order bits
- D: offset of memory
View Answer
B
Q663: The `dwMoveMethod` parameter specifies ______.
- A: file open mode
- B: how the file closes
- C: how far to move
- D: file pointer reference point
View Answer
D
Q664: Which of the following is not a valid `dwMoveMethod` value?
- A: FILE_CURRENT
- B: FILE_LAST
- C: FILE_BEGIN
- D: FILE_END
View Answer
B
Q665: Which API is more suitable for random access in 64-bit files?
- A: ReadFile()
- B: WriteFile()
- C: SetFilePointerEx()
- D: CloseHandle()
View Answer
C
Q666: To move the file pointer relative to the start of the file, use ______.
- A: FILE_CURRENT
- B: FILE_END
- C: FILE_START
- D: FILE_BEGIN
View Answer
D
Q667: To shift the pointer from the current location, use ______.
- A: FILE_BEGIN
- B: FILE_END
- C: FILE_CURRENT
- D: FILE_MOVE
View Answer
C
Q668: To move the file pointer to the end of the file, the value used is ______.
- A: FILE_BEGIN
- B: FILE_CURRENT
- C: FILE_END
- D: FILE_LAST
View Answer
C
Q669: The file pointer changes position during ______ operations.
- A: rename
- B: read/write
- C: delete
- D: compress
View Answer
B
Q670: Every subsequent read/write operation takes place at ______.
- A: the start of file
- B: the last accessed block
- C: the current file pointer position
- D: the file size location
View Answer
C