Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 91
Q1921:
What flag in CreateProcess() determines if handles are inherited?
A. bInheritFlag
B. bInheritHandles
C. handleFlag
D. processFlag
Correct Answer: B
Chapter: 91
Q1922:
Which structure must be used to make individual handles inheritable?
A. STARTUPINFO
B. PROCESS_INFORMATION
C. SECURITY_ATTRIBUTES
D. HANDLE_ATTRIBUTES
Correct Answer: C
Chapter: 91
Q1923:
The nLength member of SECURITY_ATTRIBUTES must be set to ______.
A. sizeof(HANDLE)
B. sizeof(int)
C. sizeof(SECURITY_ATTRIBUTES)
D. MAX_LENGTH
Correct Answer: C
Chapter: 91
Q1924:
Which of the following handles is typically inherited by a child process?
A. Database handles
B. Standard input and output handles
C. File descriptors
D. Memory pointers
Correct Answer: B
Chapter: 91
Q1925:
A child process can directly receive a copy of the parent's open handles if those handles are ______.
A. closed
B. protected
C. inheritable
D. reserved
Correct Answer: C
Chapter: 91
Q1926:
The purpose of inheriting handles is to share access to ______ between parent and child processes.
A. shared memory
B. user interface
C. system settings
D. resources like input/output
Correct Answer: A
Chapter: 91
Q1927:
To make a handle inheritable, the SECURITY_ATTRIBUTES must include a flag called ______.
A. handleFlag
B. bInheritFlag
C. securityMode
D. accessLevel
Correct Answer: B
Chapter: 91
Q1928:
The process of handle inheritance is defined at the time of ______.
A. closing the handle
B. declaring the variable
C. creating the process
D. ending the process
Correct Answer: C
Chapter: 91
Q1929:
Which flag in the SECURITY_ATTRIBUTES structure must be explicitly set for handle inheritance?
A. bSecurityFlag
B. bInheritFlag
C. inheritMode
D. securityAccess
Correct Answer: B
Chapter: 91
Q1930:
When should the nLength in SECURITY_ATTRIBUTES be assigned sizeof(SECURITY_ATTRIBUTES)?
A. before using the structure
B. when closing the handle
C. when accessing memory
D. after CreateProcess()
Correct Answer: A
Chapter: 91
Q1931:
Standard input and output are typically shared between parent and child using ______.
A. command line arguments
B. handle pointers
C. inheritable handles
D. memory mapping
Correct Answer: C
Chapter: 91
Q1932:
If bInheritHandles is set to FALSE, the child process ______.
A. inherits all handles
B. inherits no handles
C. inherits random handles
D. inherits only read handles
Correct Answer: B
Chapter: 91
Q1933:
The CreateProcess() API allows child processes to inherit handles based on ______.
A. execution mode
B. handle size
C. flag settings
D. security level
Correct Answer: C
Chapter: 91
Q1934:
Inheritable handles are often used for sharing files, input/output streams, and ______.
A. graphics
B. environment variables
C. user interfaces
D. process names
Correct Answer: B
Chapter: 91
Q1935:
Without setting bInheritFlag to TRUE, even if bInheritHandles is set, handles will not be inherited.
A. A
B. B
Correct Answer: A
Chapter: 91
Q1936:
bInheritHandles in CreateProcess() alone is enough to make all handles inheritable.
A. A
B. B
Correct Answer: B
Chapter: 91
Q1937:
SECURITY_ATTRIBUTES helps specify whether a handle is inheritable.
A. A
B. B
Correct Answer: A
Chapter: 91
Q1938:
Standard output can be shared using handle inheritance.
A. A
B. B
Correct Answer: A
Chapter: 91
Q1939:
A handle not marked with bInheritFlag=TRUE is still inherited.
A. A
B. B
Correct Answer: B
Chapter: 91
Q1940:
SECURITY_ATTRIBUTES contains which two key fields for inheritance?
A. nSize and handleType
B. bInheritFlag and nLength
C. hFlag and pSize
D. length and parentID
Correct Answer: B

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now