Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q2531: Threads and actions should be synchronized so that action can be performed after ______ execution.
  • A: process
  • B: thread
  • C: thread termination
  • D: thread start
View Answer
C

Q2532: Which C library function is used to extract tokens from a string but is not thread-safe?
  • A: strtok()
  • B: strtok_s()
  • C: strtok_r()
  • D: strtok_safe()
View Answer
A

Q2533: The problem of thread safety arises because strtok() uses ______ memory space for processing.
  • A: local
  • B: global
  • C: heap
  • D: stack
View Answer
B

Q2534: Thread safety issues when using strtok() can cause results to be ______.
  • A: accurate
  • B: compromised
  • C: optimized
  • D: consistent
View Answer
B

Q2535: LIBCMT is a ______ provided by Windows C for thread-safe C library functions.
  • A: thread-safe library
  • B: debugging tool
  • C: compiler
  • D: IDE
View Answer
A

Q2536: The equivalent of CreateThread() in the C library is ______.
  • A: _beginthreadex()
  • B: _endthreadex()
  • C: CreateProcess()
  • D: ExitThread()
View Answer
A

Q2537: The function used to end a thread in C library threading is ______.
  • A: _beginthreadex()
  • B: _endthreadex()
  • C: ExitThread()
  • D: CreateThread()
View Answer
B

Q2538: _beginthreadex() does not allow users to specify ______.
  • A: return values
  • B: security attributes
  • C: thread ID
  • D: stack size
View Answer
B

Q2539: _endthreadex() does not allow ______.
  • A: return values
  • B: thread creation
  • C: thread termination
  • D: thread status passing
View Answer
D

Q2540: When using _beginthreadex() in a Windows program, its return value must be typecast to ______ to process further.
  • A: DWORD
  • B: HANDLE
  • C: int
  • D: BOOL
View Answer
B

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now