System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q1941: Programmatically, inheritable handles are created by setting values inside ______.
- A: PROCESS_INFORMATION
- B: SECURITY_ATTRIBUTES
- C: STARTUPINFO
- D: HANDLE_TABLE
View Answer
B
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
View Answer
C
Q1943: The handle inheritance mechanism is defined during ______ of the child process.
- A: termination
- B: startup
- C: creation
- D: execution
View Answer
C
Q1944: Inheritable handles help child processes access the same resource as the parent.
- A: A
- B: B
- C:
- D:
View Answer
A
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
View Answer
C
Q1946: Inheritable handles are passed to child processes using ______.
- A: network sockets
- B: STARTUPINFO or command line
- C: environment variables
- D: class members
View Answer
B
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
View Answer
C
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
View Answer
D
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
View Answer
C
Q1950: Which method does NOT require any code change in the child process?
- A: IPC
- B: STARTUPINFO
- C: Shared Memory
- D: Sockets
View Answer
B