System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q2481: The function passed to CreateThread() usually has the form: DWORD WINAPI ______ (LPVOID).
- A: ThreadFunc
- B: ThreadMain
- C: ThreadStart
- D: ThreadBegin
View Answer
A
Q2482: The thread function returns a ______ value, usually an exit code.
- A: DWORD
- B: int
- C: VOID
- D: BOOL
View Answer
A
Q2483: dwCreationFlags = 0 means the thread will start ______.
- A: immediately
- B: later
- C: suspended
- D: stopped
View Answer
A
Q2484: If dwCreationFlags is CREATE_SUSPENDED, the thread will be ______ initially.
- A: stopped
- B: suspended
- C: running
- D: waiting
View Answer
B
Q2485: The thread can be started after suspension by calling ______.
- A: ResumeThread()
- B: StartThread()
- C: BeginThread()
- D: RunThread()
View Answer
A
Q2486: lpThreadId in CreateThread() is a pointer to a DWORD that receives the thread ______.
- A: identifier
- B: value
- C: address
- D: stack
View Answer
A
Q2487: If lpThreadId is kept NULL, then the thread ______ will not be returned.
- A: identifier
- B: return
- C: value
- D: status
View Answer
A
Q2488: CreateThread() returns a ______ which can be used to manage the thread.
- A: HANDLE
- B: THREAD
- C: PROCESS
- D: OBJECT
View Answer
A
Q2489: The lpParameter argument in CreateThread() usually points to a ______ containing arguments.
- A: structure
- B: class
- C: method
- D: variable
View Answer
A
Q2490: Which function is used by a thread to exit and provide an exit code?
- A: ExitProcess()
- B: ExitThread()
- C: TerminateThread()
- D: CloseThread()
View Answer
B