Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 117
Q2541:
The original return type of _beginthreadex() is not ______.
A. HANDLE
B. DWORD
C. int
D. BOOL
Correct Answer: A
Chapter: 117
Q2542:
strtok() can cause problems when used in a ______ environment.
A. multithreaded
B. single-threaded
C. serial
D. asynchronous
Correct Answer: A
Chapter: 117
Q2543:
The C library threading functions are ______ than Windows threading functions.
A. more complex
B. simpler
C. less reliable
D. identical
Correct Answer: B
Chapter: 117
Q2544:
Using Windows threading functions and C library threading functions together can cause ______ problems.
A. thread-safety
B. synchronization
C. performance
D. compatibility
Correct Answer: A
Chapter: 117
Q2545:
To program a multithreaded C application safely, use ______ library functions.
A. Windows threading
B. standard C
C. thread-safe C
D. non-thread-safe C
Correct Answer: C
Chapter: 118
Q2546:
In multithreaded pattern searching, a separate thread is created for each ______ to search the pattern.
A. file
B. pattern
C. process
D. function
Correct Answer: A
Chapter: 118
Q2547:
In synchronous input-output, execution stops when a keyboard button is pressed until the button is ______.
A. released
B. pressed
C. waited
D. stopped
Correct Answer: A
Chapter: 118
Q2548:
In asynchronous input-output, a sound card can play a song while other operations are ______ performed.
A. concurrently
B. sequentially
C. delayed
D. not
Correct Answer: B
Chapter: 118
Q2549:
The main problem in multithreaded pattern searching arises when multiple processes try to ______ a single file simultaneously.
A. write
B. read
C. open
D. close
Correct Answer: A
Chapter: 118
Q2550:
Which function is used to create a worker thread in the example code?
A. _beginthreadex
B. CreateThread
C. ExitThread
D. WaitForMultipleObjects
Correct Answer: A
Chapter: 118
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
Correct Answer: B
Chapter: 118
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
Correct Answer: A
Chapter: 118
Q2553:
What does the _tcscpy function do in this program?
A. Copies strings
B. Creates threads
C. Deletes files
D. Waits for threads
Correct Answer: A
Chapter: 118
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
Correct Answer: B
Chapter: 118
Q2555:
Which function deletes temporary files after thread completion?
A. DeleteFile
B. CloseHandle
C. WaitForSingleObject
D. CreateProcess
Correct Answer: A
Chapter: 118
Q2556:
Which structure holds startup information for process creation?
A. PROCESS_INFORMATION
B. STARTUPINFO
C. THREAD_INFO
D. PROCESS_START
Correct Answer: B
Chapter: 118
Q2557:
In the multithreaded grep example, threadCount is set to ______.
A. argc
B. argc - 1
C. argc - 2
D. argc + 2
Correct Answer: C
Chapter: 118
Q2558:
What is the return data type of the thread function ThGrep?
A. DWORD
B. int
C. HANDLE
D. void
Correct Answer: A
Chapter: 118
Q2559:
GetTempFileName generates a temporary file name stored in thread argument index ______.
A. 1
B. 2
C. 3
D. 4
Correct Answer: C
Chapter: 118
Q2560:
In the thread creation loop, the second argument passed stores the ______.
A. pattern
B. file name
C. process ID
D. temporary file name
Correct Answer: B

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now