System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 185
Q4021:
In a named pipe system, each thread on the server handles
A. a batch of clients
B. a single client
C. multiple pipes
D. pipe creation
Correct Answer:
B
Chapter: 185
Q4022:
The client/server relationship in named pipes relies on
A. shared memory
B. socket connection
C. dedicated thread and pipe instance
D. common buffers
Correct Answer:
D
Chapter: 185
Q4023:
CreateNamedPipe() is called by
A. clients
B. threads
C. servers
D. files
Correct Answer:
C
Chapter: 185
Q4024:
In named pipe communication, the server creates _______ for each pipe instance.
A. different clients
B. different handles
C. different threads
D. same threads
Correct Answer:
C
Chapter: 185
Q4025:
Each client communicates with the server using
A. a common thread
B. dedicated instance and thread
C. multiple semaphores
D. anonymous pipes
Correct Answer:
B
Chapter: 185
Q4026:
To open a named pipe, the client must use
A. CreateFile()
B. CreatePipe()
C. OpenThread()
D. InitializePipe()
Correct Answer:
A
Chapter: 185
Q4027:
The function that defines how many clients can simultaneously connect to a server is
A. CreateNamedPipe()
B. InitPipe()
C. AssignThread()
D. ClientInstance()
Correct Answer:
A
Chapter: 185
Q4028:
A named pipe instance is identified using a
A. handle
B. process ID
C. thread name
D. server ID
Correct Answer:
A
Chapter: 185
Q4029:
The named pipe model works on which of the following patterns?
A. publish/subscribe
B. producer/consumer
C. client/server
D. event-driven
Correct Answer:
C
Chapter: 185
Q4030:
In named pipes, the server process is responsible for
A. creating handles only
B. reading only
C. creating pipes and assigning threads
D. monitoring memory
Correct Answer:
C
Chapter: 185
Q4031:
The server creates multiple pipe instances to support
A. multiple servers
B. multiple threads
C. multiple clients
D. multiple ports
Correct Answer:
C
Chapter: 185
Q4032:
CreateNamedPipe() creates ______ and returns a handle.
A. a new file
B. a thread
C. a pipe instance
D. a signal
Correct Answer:
C
Chapter: 185
Q4033:
Each client is supported by a distinct _______ created by the server.
A. thread name
B. thread and pipe instance
C. buffer pool
D. message box
Correct Answer:
B
Chapter: 185
Q4034:
The maximum number of ______ is specified in the CreateNamedPipe() function.
A. messages
B. machines
C. connections
D. instances
Correct Answer:
D
Chapter: 186
Q4035:
What function is used to create a named pipe?
A. CreatePipe()
B. CreateNamedPipe()
C. InitPipe()
D. OpenNamedPipe()
Correct Answer:
B
Chapter: 186
Q4036:
The handle returned by CreateNamedPipe() refers to
A. a remote server
B. the named pipe instance
C. a thread ID
D. a memory block
Correct Answer:
B
Chapter: 186
Q4037:
What is the format of the pipe name in CreateNamedPipe()?
A. \\pipe\name
B. \\.\pipe\pipeName
C. \\namedpipe\\name
D. \\host\pipe\name
Correct Answer:
B
Chapter: 186
Q4038:
In the pipe name \\.\pipe\pipeName, the period (.) refers to
A. local machine
B. default pipe
C. case insensitivity
D. root directory
Correct Answer:
A
Chapter: 186
Q4039:
Creating a named pipe on a remote machine using CreateNamedPipe() is
A. possible
B. limited
C. not allowed
D. supported by default
Correct Answer:
C
Chapter: 186
Q4040:
The name of a pipe can contain any character except
A. backslash
B. forward slash
C. period
D. underscore
Correct Answer:
A