System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q2161: In the program, what does 'argc' represent?
- A: Number of processes
- B: Number of command line arguments
- C: Number of files
- D: Number of patterns
View Answer
B
Q2162: What does the variable 'procFile' store?
- A: Pattern strings
- B: Process IDs
- C: Temporary file names
- D: File sizes
View Answer
C
Q2163: What flag is set when creating processes to support Unicode environment?
- A: CREATE_UNICODE_ENVIRONMENT
- B: CREATE_NEW_CONSOLE
- C: CREATE_SUSPENDED
- D: CREATE_NO_WINDOW
View Answer
A
Q2164: What function is used to report errors in the program?
- A: ReportError()
- B: ErrorReport()
- C: PrintError()
- D: LogError()
View Answer
A
Q2165: What does the command line look like for each grep process?
- A: grep pattern file
- B: grep file pattern
- C: grep "pattern" "filename"
- D: grep filename pattern
View Answer
C
Q2166: How are temporary files created for storing output?
- A: GetTempFileName()
- B: CreateTempFile()
- C: OpenTempFile()
- D: MakeTempFile()
View Answer
A
Q2167: What access is requested when opening a temporary file for writing?
- A: GENERIC_READ
- B: GENERIC_WRITE
- C: GENERIC_EXECUTE
- D: GENERIC_ALL
View Answer
B
Q2168: What happens if CreateFile fails to open the temporary file?
- A: Program continues
- B: ReportError is called
- C: Temporary file is created
- D: File is skipped
View Answer
B
Q2169: Which structure holds startup information for each child process?
- A: PROCESS_INFORMATION
- B: STARTUPINFO
- C: SECURITY_ATTRIBUTES
- D: COMMAND_LINE
View Answer
B
Q2170: What flag indicates the child process will use the standard handles?
- A: STARTF_USESHOWWINDOW
- B: STARTF_USESTDHANDLES
- C: STARTF_RUNFULLSCREEN
- D: STARTF_USEPOSITION
View Answer
B