System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 186
Q4041:
The maximum length of a pipe name can be
A. up to 128 characters
B. up to 512 characters
C. up to 256 characters
D. up to 64 characters
Correct Answer:
C
Chapter: 186
Q4042:
Pipe names used in CreateNamedPipe() are
A. case sensitive
B. case insensitive
C. always uppercase
D. always lowercase
Correct Answer:
B
Chapter: 186
Q4043:
The parameter dwOpenMode defines
A. pipe name
B. thread access
C. open mode
D. pipe direction
Correct Answer:
C
Chapter: 186
Q4044:
Which of the following is a valid value for dwOpenMode?
A. PIPE_READ
B. PIPE_ACCESS_DUPLEX
C. PIPE_WRITE_ONLY
D. PIPE_CREATE
Correct Answer:
B
Chapter: 186
Q4045:
PIPE_ACCESS_DUPLEX allows
A. reading only
B. writing only
C. both reading and writing
D. scheduling threads
Correct Answer:
C
Chapter: 186
Q4046:
Which parameter decides if the pipe is message or byte oriented?
A. dwOpenMode
B. dwPipeMode
C. nMaxInstance
D. nDefaultTimeOut
Correct Answer:
B
Chapter: 186
Q4047:
nMaxInstance specifies
A. the length of the pipe
B. the buffer size
C. the timeout period
D. the number of pipe instances
Correct Answer:
D
Chapter: 186
Q4048:
Which of the following is defined by nOutBufferSize and nInBufferSize?
A. buffer length in characters
B. buffer length in bits
C. buffer length in bytes
D. timeout duration
Correct Answer:
C
Chapter: 186
Q4049:
What does nDefaultTimeOut parameter represent?
A. default memory allocation
B. thread delay
C. time before pipe disconnects
D. default timeout period
Correct Answer:
D
Chapter: 186
Q4050:
lpSecurityAttributes are used for
A. defining permissions
B. assigning buffers
C. defining pipe name
D. defining read/write mode
Correct Answer:
A
Chapter: 186
Q4051:
Closing the last handle to a named pipe instance will
A. delete all handles
B. close the server
C. delete the pipe instance
D. create a new pipe
Correct Answer:
C
Chapter: 186
Q4052:
The first call to CreateNamedPipe() creates
A. a file
B. a server
C. thread pool
D. a pipe and instance
Correct Answer:
D
Chapter: 186
Q4053:
The parameter used to set security in CreateNamedPipe() is
A. nInBufferSize
B. nDefaultTimeOut
C. dwOpenMode
D. lpSecurityAttributes
Correct Answer:
D
Chapter: 186
Q4054:
The default timeout in CreateNamedPipe() is set using
A. pipe name
B. lpName
C. nDefaultTimeOut
D. dwPipeMode
Correct Answer:
C
Chapter: 186
Q4055:
Pipe names must follow a specific format starting with
A. /pipe/\
B. \\.\pipe\
C. pipe:\\
D. \pipe\\
Correct Answer:
B
Chapter: 186
Q4056:
Named pipes can be created with a name up to
A. 128 characters
B. 256 characters
C. 512 characters
D. 64 characters
Correct Answer:
B
Chapter: 187
Q4057:
Which function is used by the client to connect to a named pipe?
A. OpenPipe()
B. CreatePipe()
C. CreateFile()
D. OpenFile()
Correct Answer:
C
Chapter: 187
Q4058:
In most scenarios, the client and server of a named pipe are
A. located on different machines
B. located on the same machine
C. always connected via the internet
D. separate physical devices
Correct Answer:
B
Chapter: 187
Q4059:
To connect to a pipe on a remote server, the format is
A. \\.\pipe\[path]pipename
B. \\pipe\server\name
C. \\servername\pipe\pipename
D. \\remote\pipe\[name]
Correct Answer:
C
Chapter: 187
Q4060:
To connect to a pipe on a local server, the server name used in the path is
A. localhost
B. (current IP)
C. .
D. 127.0.0.1
Correct Answer:
C