Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 91
Q1941:
Programmatically, inheritable handles are created by setting values inside ______.
A. PROCESS_INFORMATION
B. SECURITY_ATTRIBUTES
C. STARTUPINFO
D. HANDLE_TABLE
Correct Answer: B
Chapter: 91
Q1942:
Which of the following is not required to make a handle inheritable?
A. bInheritHandles flag
B. setting bInheritFlag in SECURITY_ATTRIBUTES
C. changing working directory
D. setting nLength correctly
Correct Answer: C
Chapter: 91
Q1943:
The handle inheritance mechanism is defined during ______ of the child process.
A. termination
B. startup
C. creation
D. execution
Correct Answer: C
Chapter: 91
Q1944:
Inheritable handles help child processes access the same resource as the parent.
A. A
B. B
Correct Answer: A
Chapter: 92
Q1945:
Which structure is preferred for passing inheritable handles to a child process?
A. SECURITY_ATTRIBUTES
B. PROCESS_INFORMATION
C. STARTUPINFO
D. CREATE_PROCESS_INFO
Correct Answer: C
Chapter: 92
Q1946:
Inheritable handles are passed to child processes using ______.
A. network sockets
B. STARTUPINFO or command line
C. environment variables
D. class members
Correct Answer: B
Chapter: 92
Q1947:
What is one benefit of using STARTUPINFO to pass handles to the child process?
A. It disables IO redirection
B. It bypasses inheritance
C. It allows IO redirection
D. It requires code in the child process
Correct Answer: C
Chapter: 92
Q1948:
A file handle can be passed to a child process via command line by ______.
A. encrypting it
B. using GetHandle()
C. declaring it globally
D. converting it into text
Correct Answer: D
Chapter: 92
Q1949:
Inherited handles are copies, meaning parent and child access ______.
A. the same memory location
B. the same handle ID
C. same file with different file pointer
D. different files
Correct Answer: C
Chapter: 92
Q1950:
Which method does NOT require any code change in the child process?
A. IPC
B. STARTUPINFO
C. Shared Memory
D. Sockets
Correct Answer: B
Chapter: 92
Q1951:
If a handle is inheritable, the child process can ______.
A. automatically delete it
B. ignore it
C. access it directly
D. encrypt it
Correct Answer: C
Chapter: 92
Q1952:
Handles must be closed by ______.
A. the parent only
B. the child only
C. the operating system
D. both parent and child
Correct Answer: D
Chapter: 92
Q1953:
Converting handles into text and passing through command line is a technique for ______.
A. restricting access
B. encryption
C. debugging
D. passing handles
Correct Answer: D
Chapter: 92
Q1954:
Which of the following is a valid reason to prefer STARTUPINFO for handle passing?
A. Simplicity in parent process
B. Better memory access
C. No changes required in child process
D. Compatibility with .NET
Correct Answer: C
Chapter: 92
Q1955:
STARTUPINFO allows handle redirection primarily for ______.
A. memory allocation
B. network services
C. IO operations
D. environment variables
Correct Answer: C
Chapter: 92
Q1956:
Passing handles via IPC means using mechanisms like ______.
A. STARTUPINFO
B. files and folders
C. named pipes or sockets
D. function pointers
Correct Answer: C
Chapter: 92
Q1957:
Parent and child can access the same file via different ______.
A. process names
B. file names
C. drive letters
D. file pointers
Correct Answer: D
Chapter: 92
Q1958:
What is the effect of making a handle inheritable but not passing it properly?
A. It is ignored
B. It is automatically managed
C. It becomes non-inheritable
D. It causes runtime errors
Correct Answer: A
Chapter: 92
Q1959:
Which technique allows interprocess handle sharing without modifying the child?
A. shared memory
B. STARTUPINFO
C. manual copy
D. command line
Correct Answer: B
Chapter: 92
Q1960:
Inherited handles accessed by both processes must be ______.
A. protected
B. duplicated
C. closed independently
D. logged
Correct Answer: C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now