System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 31
Q701:
LARGE_INTEGER is useful in 64-bit file operations for handling ______.
A. symbol tables
B. security checks
C. large file positions
D. timestamps
Correct Answer:
C
Chapter: 31
Q702:
The structure of LARGE_INTEGER includes ______ components.
A. only one field
B. only QuadPart
C. HighPart and LowPart
D. only HighPart
Correct Answer:
C
Chapter: 32
Q703:
What header file is required to use the OVERLAPPED structure?
A. stdio.h
B. windows.h
C. string.h
D. system.h
Correct Answer:
B
Chapter: 32
Q704:
The OVERLAPPED structure is mainly used in
A. networking
B. CPU scheduling
C. file operations
D. video encoding
Correct Answer:
C
Chapter: 32
Q705:
Which API functions can use the OVERLAPPED structure?
A. ReadFile and WriteFile
B. GetMessage and SendMessage
C. CreateThread and ExitThread
D. OpenProcess and CloseHandle
Correct Answer:
A
Chapter: 32
Q706:
The OVERLAPPED structure allows setting the file pointer without calling
A. OpenFile()
B. ReadConsole()
C. SetFilePointer()
D. CreateFile()
Correct Answer:
C
Chapter: 32
Q707:
Which fields in OVERLAPPED must be set to 0xFFFFFFFF to append to a file?
A. Internal and InternalHigh
B. Pointer and hEvent
C. Offset and OffsetHigh
D. QuadPart and LowPart
Correct Answer:
C
Chapter: 32
Q708:
Which field in OVERLAPPED is reserved and not used directly by the application?
A. Pointer
B. Offset
C. Internal
D. nWrite
Correct Answer:
C
Chapter: 32
Q709:
The OffsetHigh field stores the ______ of the file pointer.
A. file size
B. high-order bits
C. current position
D. buffer address
Correct Answer:
B
Chapter: 32
Q710:
The structure field that stores the low part of file position is called
A. OffsetLow
B. LowOffset
C. LowPart
D. Offset
Correct Answer:
D
Chapter: 32
Q711:
Which variable type is typically used to store 64-bit file positions before assigning to OVERLAPPED?
A. LONGLONG
B. LARGE_INTEGER
C. DWORD
D. INT64
Correct Answer:
B
Chapter: 32
Q712:
In which structure are Offset and OffsetHigh fields found?
A. BUFFER
B. OVERLAPPED
C. FILEINFO
D. HANDLE
Correct Answer:
C
Chapter: 32
Q713:
What does the Pointer field inside OVERLAPPED typically hold?
A. Unused or custom pointer
B. File handle
C. File descriptor
D. Event pointer
Correct Answer:
A
Chapter: 32
Q714:
The OVERLAPPED structure can be used even in ______ operations.
A. blocked
B. single-threaded
C. non-overlapped
D. unbuffered
Correct Answer:
C
Chapter: 32
Q715:
The field ‘hEvent’ in OVERLAPPED structure is used for
A. event handling
B. buffer size assignment
C. file locking
D. priority setting
Correct Answer:
A
Chapter: 32
Q716:
The correct way to assign file pointer position using LARGE_INTEGER is
A. filePos.Offset = x
B. filePos.Part1 = x
C. filePos.QuadPart = x
D. filePos.Pointer = x
Correct Answer:
C
Chapter: 32
Q717:
To set Offset fields from LARGE_INTEGER, you extract
A. QuadWord and DoubleWord
B. HighPart and LowPart
C. HighByte and LowByte
D. LowBit and HighBit
Correct Answer:
B
Chapter: 32
Q718:
What kind of pointer is used with OVERLAPPED in ReadFile or WriteFile?
A. *INT
B. *HANDLE
C. *LPOVERLAPPED
D. *FILEINFO
Correct Answer:
C
Chapter: 32
Q719:
The OVERLAPPED structure allows multitasking by enabling
A. parallel execution
B. ofstream support
C. parallel buffering
D. separate file threads
Correct Answer:
A
Chapter: 32
Q720:
You can perform asynchronous file operations using
A. OVERLAPPED
B. QUADWORD
C. STRINGBUFFER
D. FILEINFO
Correct Answer:
A