System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q2171: What handles are set for standard output and error in the child process?
- A: Standard input handle
- B: Temporary file handle
- C: Parent process handle
- D: System handle
View Answer
B
Q2172: What function is used to create a new process?
- A: CreateProcess()
- B: StartProcess()
- C: RunProcess()
- D: LaunchProcess()
View Answer
A
Q2173: What handles are closed immediately after creating the child process?
- A: File handle and thread handle
- B: Process handle and thread handle
- C: File handle and process handle
- D: File handle and thread handle
View Answer
D
Q2174: How are process handles stored for waiting?
- A: In an array
- B: In a linked list
- C: In a queue
- D: In a stack
View Answer
A
Q2175: What function waits for multiple processes to complete?
- A: WaitForSingleObject()
- B: WaitForMultipleObjects()
- C: WaitForProcess()
- D: WaitAllProcesses()
View Answer
B
Q2176: What does the program do with the result files after processes finish?
- A: Deletes them
- B: Archives them
- C: Leaves them open
- D: Prints them
View Answer
A
Q2177: How are results displayed after all processes finish?
- A: By reading temp files with 'cat' command
- B: By copying files
- C: By printing file names
- D: By deleting files
View Answer
A
Q2178: What is the significance of checking exitCode == 0?
- A: Pattern was found
- B: Process failed
- C: Process skipped
- D: Process still running
View Answer
A
Q2179: Which function deletes the temporary files?
- A: DeleteFile()
- B: RemoveFile()
- C: CloseHandle()
- D: DeleteTemp()
View Answer
A
Q2180: What must be done after finishing with process handles to avoid resource leaks?
- A: CloseHandle()
- B: OpenHandle()
- C: CopyHandle()
- D: FreeHandle()
View Answer
A