21. What is the purpose of the ManualResetEvent class in C# multithreading? A. To manage a collection of threads B. To signal one or more waiting threads that an event has occurred C. To provide synchronization mechanisms for multithreaded programs D. None of the above Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
22. What is the difference between a thread pool and creating a new thread in C#? A. Thread pool is used for single-threaded applications, while creating a new thread is used for multithreaded applications B. Thread pool and creating a new thread are synonymous C. Thread pool reuses existing threads for multiple tasks, while creating a new thread creates a separate thread for each task D. Thread pool creates a separate thread for each task, while creating a new thread reuses existing threads for multiple tasks Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
23. Which method is used to interrupt a thread in C#? A. Stop() B. Halt() C. Break() D. Interrupt() Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
24. What is the purpose of the Monitor class in C# multithreading? A. To allocate memory for storing thread-related data B. To signal one or more waiting threads that an event has occurred C. To provide a mechanism for thread synchronization using locks D. To manage a collection of threads Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
25. What is a critical section in multithreading? A. A section of code that is executed by multiple threads simultaneously B. A section of code that is executed by multiple threads in parallel C. A section of code that is executed only when a certain condition is met by multiple threads D. A section of code that must be executed by only one thread at a time Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
26. Which method is used to suspend the execution of a thread until a specified time in C#? A. Sleep() B. Wait() C. Suspend() D. Pause() Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
27. What is the purpose of the Semaphore class in C# multithreading? A. To provide synchronization mechanisms for multithreaded programs B. To signal one or more waiting threads that an event has occurred C. To manage a collection of threads D. To limit the number of threads that can access a resource at a time Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
28. Which method is used to resume the execution of a suspended thread in C#? A. Continue() B. Start() C. Resume() D. Execute() Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
29. What is the purpose of the Interlocked class in C# multithreading? A. To signal one or more waiting threads that an event has occurred B. To perform atomic operations on variables C. To provide synchronization mechanisms for multithreaded programs D. None of the above Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
30. Which method is used to wait for a thread to terminate in C#? A. Sleep() B. Suspend() C. Join() D. Wait() Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board