Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 114
Q2501:
GetCurrentThreadId() returns the ______ of the calling thread.
A. handle
B. thread ID
C. stack
D. memory
Correct Answer: B
Chapter: 114
Q2502:
GetThreadId() obtains the thread ID from a given ______.
A. thread handle
B. thread argument
C. thread stack
D. thread function
Correct Answer: A
Chapter: 114
Q2503:
OpenThread() is used to create a thread ______ from the thread ID.
A. handle
B. stack
C. memory
D. pointer
Correct Answer: A
Chapter: 114
Q2504:
The function used to get a thread handle from the thread ID is ______.
A. GetThreadId()
B. OpenThread()
C. GetCurrentThread()
D. GetCurrentThreadId()
Correct Answer: B
Chapter: 114
Q2505:
GetCurrentThread() returns a handle that is ______.
A. inheritable
B. non-inheritable
C. shared
D. unique
Correct Answer: B
Chapter: 114
Q2506:
The function that obtains the thread ID directly from the calling thread without a handle is ______.
A. GetThreadId()
B. GetCurrentThreadId()
C. OpenThread()
D. GetCurrentThread()
Correct Answer: B
Chapter: 114
Q2507:
The pseudohandle returned by GetCurrentThread() is ______.
A. inheritable
B. non-inheritable
C. duplicate
D. closed
Correct Answer: B
Chapter: 115
Q2508:
GetProcessIdOfThread() returns the ______ of the process linked to a specified thread.
A. thread ID
B. process ID
C. handle
D. thread status
Correct Answer: B
Chapter: 115
Q2509:
GetProcessIdOfThread() function requires Windows ______ or later versions.
A. XP
B. 2000
C. 2003
D. Vista
Correct Answer: C
Chapter: 115
Q2510:
GetThreadIOPendingFlag() checks whether a thread has any ______ I/O requests.
A. pending
B. completed
C. failed
D. started
Correct Answer: A
Chapter: 115
Q2511:
SuspendThread() function is used to ______ a running thread.
A. pause
B. start
C. resume
D. terminate
Correct Answer: A
Chapter: 115
Q2512:
ResumeThread() function is used to ______ a suspended thread.
A. start
B. pause
C. resume
D. terminate
Correct Answer: C
Chapter: 115
Q2513:
A thread runs only if its suspend count is ______.
A. 1
B. greater than 0
D. negative
Correct Answer: C
Chapter: 115
Q2514:
What does SuspendThread() return if it is successful?
A. Current suspend count
B. Previous suspend count
C. -1
D. 0xFFFFFFFF
Correct Answer: B
Chapter: 115
Q2515:
The function used to find out if a thread is blocked by I/O is ______.
A. GetProcessIdOfThread()
B. SuspendThread()
C. ResumeThread()
D. GetThreadIOPendingFlag()
Correct Answer: D
Chapter: 115
Q2516:
To resume a thread that was created suspended, use ______ function.
A. SuspendThread()
B. ResumeThread()
C. GetProcessIdOfThread()
D. GetThreadIOPendingFlag()
Correct Answer: B
Chapter: 115
Q2517:
When the suspend count of a thread is not zero, the thread is ______.
A. running
B. paused
C. terminated
D. blocked
Correct Answer: B
Chapter: 116
Q2518:
One thread can wait for another thread to ______ before proceeding.
A. start
B. complete
C. pause
D. terminate
Correct Answer: B
Chapter: 116
Q2519:
Windows treats a thread as a(n) ______.
A. process
B. object
C. file
D. system
Correct Answer: B
Chapter: 116
Q2520:
Which function is used to wait for a single thread or object?
A. WaitForMultipleObjects()
B. WaitForSingleObject()
C. WaitThread()
D. WaitOneThread()
Correct Answer: B

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now