System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 30
Q661:
What does `lDistanceToMove` represent in SetFilePointer()?
A. Number of sectors
B. 32-bit offset in bytes
C. Error code
D. File handle
Correct Answer:
B
Chapter: 30
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
Correct Answer:
B
Chapter: 30
Q663:
The `dwMoveMethod` parameter specifies ______.
A. file open mode
B. how the file closes
C. how far to move
D. file pointer reference point
Correct Answer:
D
Chapter: 30
Q664:
Which of the following is not a valid `dwMoveMethod` value?
A. FILE_CURRENT
B. FILE_LAST
C. FILE_BEGIN
D. FILE_END
Correct Answer:
B
Chapter: 30
Q665:
Which API is more suitable for random access in 64-bit files?
A. ReadFile()
B. WriteFile()
C. SetFilePointerEx()
D. CloseHandle()
Correct Answer:
C
Chapter: 30
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
Correct Answer:
D
Chapter: 30
Q667:
To shift the pointer from the current location, use ______.
A. FILE_BEGIN
B. FILE_END
C. FILE_CURRENT
D. FILE_MOVE
Correct Answer:
C
Chapter: 30
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
Correct Answer:
C
Chapter: 30
Q669:
The file pointer changes position during ______ operations.
A. rename
B. read/write
C. delete
D. compress
Correct Answer:
B
Chapter: 30
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
Correct Answer:
C
Chapter: 30
Q671:
The API used to open a file before working with pointers is ______.
A. GetFileHandle()
B. CreateFile()
C. SetFilePointer()
D. MoveFile()
Correct Answer:
B
Chapter: 30
Q672:
SetFilePointer returns INVALID_SET_FILE_POINTER on ______.
A. success
B. error
C. initialization
D. close
Correct Answer:
B
Chapter: 30
Q673:
SetFilePointerEx() supports ______ addressing for large file movement.
A. 8-bit
B. 16-bit
C. 32-bit
D. 64-bit
Correct Answer:
D
Chapter: 30
Q674:
FILE_BEGIN helps move the pointer with respect to ______.
A. current location
B. end of file
C. beginning of file
D. file permissions
Correct Answer:
C
Chapter: 30
Q675:
SetFilePointer is considered ______ when working with large files.
A. efficient
B. insecure
C. cumbersome
D. fast
Correct Answer:
C
Chapter: 30
Q676:
In SetFilePointer, to move the file pointer 10 bytes forward from current position, use ______.
A. FILE_BEGIN
B. FILE_END
C. FILE_CURRENT
D. FILE_HEADER
Correct Answer:
C
Chapter: 31
Q677:
Why is 64-bit arithmetic needed when working with large files?
A. To increase performance
B. To reduce RAM usage
C. To handle files larger than 4 GB
D. To support Unicode filenames
Correct Answer:
C
Chapter: 31
Q678:
What Windows union is used to support 64-bit file pointer arithmetic?
A. HUGE_INTEGER
B. BIG_INT
C. LARGE_INTEGER
D. QUAD_INT
Correct Answer:
C
Chapter: 31
Q679:
The union LARGE_INTEGER is designed to handle ______.
A. Unicode characters
B. memory paging
C. network traffic
D. large integer arithmetic
Correct Answer:
D
Chapter: 31
Q680:
LARGE_INTEGER is defined using which programming construct?
A. array
B. union
C. struct
D. function
Correct Answer:
B