System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q2191: What happens to process thread handles after creation?
- A: They are closed
- B: They remain open
- C: They are duplicated
- D: They are ignored
View Answer
A
Q2192: What does the 'dwCreationFlags' variable control?
- A: Process creation options
- B: Memory allocation
- C: Thread priority
- D: Handle inheritance
View Answer
A
Q2193: How are temporary file names stored in the program?
- A: In an array of PROCFILE structures
- B: In a linked list
- C: In a string buffer
- D: In environment variables
View Answer
A
Q2194: What type of synchronization does WaitForMultipleObjects provide?
- A: Handles multiple processes
- B: Single process
- C: Thread synchronization
- D: Memory synchronization
View Answer
A
Q2195: What is the main benefit of running separate processes for each file?
- A: Parallel searching
- B: More memory usage
- C: Faster file writing
- D: Easier debugging
View Answer
A
Q2196: The command line argument argv[1] is used as the ______.
- A: Search pattern
- B: File name
- C: Temporary file
- D: Exit code
View Answer
A
Q2197: The temporary file handle hTempFile is set with which sharing modes?
- A: FILE_SHARE_READ | FILE_SHARE_WRITE
- B: FILE_SHARE_WRITE only
- C: FILE_SHARE_READ only
- D: No sharing
View Answer
A
Q2198: What happens if DeleteFile fails on a temporary file?
- A: ReportError() is called
- B: Temporary file is kept silently
- C: Program exits
- D: Temporary file is renamed
View Answer
A
Q2199: Which process information structure contains process and thread handles?
- A: PROCESS_INFORMATION
- B: STARTUPINFO
- C: SECURITY_ATTRIBUTES
- D: PROCFILE
View Answer
A
Q2200: Which variable holds the count of command line arguments?
- A: argc
- B: argv
- C: hProc
- D: exitCode
View Answer
A