Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q2551: The GREP_THREAD_ARG structure contains the argument count and ______ values to be passed to the thread.
  • A: thread ID
  • B: thread argument values
  • C: thread handle
  • D: thread status
View Answer
B

Q2552: What is the purpose of the WaitForMultipleObjects function?
  • A: Wait for all threads to complete
  • B: Create new threads
  • C: Exit all threads
  • D: Print thread status
View Answer
A

Q2553: What does the _tcscpy function do in this program?
  • A: Copies strings
  • B: Creates threads
  • C: Deletes files
  • D: Waits for threads
View Answer
A

Q2554: The command line argument argv[1] stores the ______ to be searched in the files.
  • A: thread ID
  • B: pattern
  • C: file name
  • D: process name
View Answer
B

Q2555: Which function deletes temporary files after thread completion?
  • A: DeleteFile
  • B: CloseHandle
  • C: WaitForSingleObject
  • D: CreateProcess
View Answer
A

Q2556: Which structure holds startup information for process creation?
  • A: PROCESS_INFORMATION
  • B: STARTUPINFO
  • C: THREAD_INFO
  • D: PROCESS_START
View Answer
B

Q2557: In the multithreaded grep example, threadCount is set to ______.
  • A: argc
  • B: argc - 1
  • C: argc - 2
  • D: argc + 2
View Answer
C

Q2558: What is the return data type of the thread function ThGrep?
  • A: DWORD
  • B: int
  • C: HANDLE
  • D: void
View Answer
A

Q2559: GetTempFileName generates a temporary file name stored in thread argument index ______.
  • A: 1
  • B: 2
  • C: 3
  • D: 4
View Answer
C

Q2560: In the thread creation loop, the second argument passed stores the ______.
  • A: pattern
  • B: file name
  • C: process ID
  • D: temporary file name
View Answer
B

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now