System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 188
Q4081:
_______ can return the number of pipe instances.
A. GetPipeCount()
B. GetNamedPipeHandleState()
C. GetNamedPipeInstanceCount()
D. GetNamedPipeInfo()
Correct Answer:
B
Chapter: 188
Q4082:
The function used to get both input and output buffer sizes is
A. GetNamedPipeIOSize()
B. GetNamedPipeBufferLength()
C. GetNamedPipeInfo()
D. GetNamedPipeHandleState()
Correct Answer:
C
Chapter: 188
Q4083:
SetNamedPipeHandleState() accepts which type of parameters?
A. values only
B. pointers only
C. references or NULL
D. all of the above
Correct Answer:
D
Chapter: 188
Q4084:
The function GetNamedPipeHandleState() can return
A. session ID
B. buffer size
C. client machine name
D. whether pipe is blocking
Correct Answer:
D
Chapter: 188
Q4085:
_______ allows the program to modify pipe handle state.
A. SetNamedPipeHandleState()
B. ModifyPipeState()
C. ConfigurePipe()
D. SetPipeHandle()
Correct Answer:
A
Chapter: 188
Q4086:
_______ provides details about whether the pipe is message or byte oriented.
A. GetPipeMode()
B. GetNamedPipeInfo()
C. GetNamedPipeAttributes()
D. GetPipeDataType()
Correct Answer:
B
Chapter: 188
Q4087:
GetNamedPipeHandleState() reports on _______
A. mode, type, and instance count
B. only buffer size
C. client machine name
D. security credentials
Correct Answer:
A
Chapter: 188
Q4088:
_______ helps identify whether a pipe handle is client-side or server-side.
A. GetNamedPipeSource()
B. GetPipeStatus()
C. GetNamedPipeInfo()
D. GetPipeRole()
Correct Answer:
C
Chapter: 188
Q4089:
A NULL parameter in SetNamedPipeHandleState() indicates
A. no permission
B. no handle
C. no change required
D. no connection
Correct Answer:
C
Chapter: 188
Q4090:
_______ retrieves the process ID of the server end of the pipe.
A. GetServerProcess()
B. GetNamedPipeServerProcessId()
C. GetPipeHostProcess()
D. GetPipePID()
Correct Answer:
B
Chapter: 189
Q4091:
Which function is used to establish a connection between client and server on a named pipe?
A. OpenNamedPipe()
B. ConnectNamedPipe()
C. CreateNamedPipe()
D. LinkNamedPipe()
Correct Answer:
B
Chapter: 189
Q4092:
The ConnectNamedPipe() function requires which handle as its first parameter?
A. File handle
B. Socket handle
C. Named pipe handle
D. Thread handle
Correct Answer:
C
Chapter: 189
Q4093:
What happens if lpOverlapped is NULL in ConnectNamedPipe()?
A. Asynchronous connection
B. Synchronous connection
C. Immediate return on connection
D. Returns FALSE
Correct Answer:
C
Chapter: 189
Q4094:
Which function is used to disconnect a connected named pipe?
A. CloseHandle()
B. DisconnectNamedPipe()
C. TerminatePipe()
D. ReleasePipe()
Correct Answer:
B
Chapter: 189
Q4095:
ConnectNamedPipe() will return FALSE with which error if pipe is already connected?
A. ERROR_PIPE_BUSY
B. ERROR_PIPE_CONNECTED
C. ERROR_ACCESS_DENIED
D. ERROR_PIPE_FULL
Correct Answer:
B
Chapter: 189
Q4096:
After a client is connected, which function allows data to be read?
A. ReadPipe()
B. ReadFile()
C. GetData()
D. ReadMessage()
Correct Answer:
B
Chapter: 189
Q4097:
Once connected, the server sends data using
A. SendFile()
B. WriteMessage()
C. WritePipe()
D. WriteFile()
Correct Answer:
D
Chapter: 189
Q4098:
To synchronize connections to the server, use
A. SyncPipe()
B. WaitNamedPipe()
C. PipeSynchronize()
D. HoldPipe()
Correct Answer:
B
Chapter: 189
Q4099:
The lpOverlapped parameter in ConnectNamedPipe() is used for
A. reading data
B. writing data
C. synchronizing asynchronous operation
D. closing the pipe
Correct Answer:
C
Chapter: 189
Q4100:
If ConnectNamedPipe() returns FALSE, which error indicates an already connected pipe?
A. ERROR_PIPE_DISCONNECTED
B. ERROR_PIPE_BUSY
C. ERROR_PIPE_CONNECTED
D. ERROR_PIPE_DELAY
Correct Answer:
C