Vidyalelo
C++ Programming · all questions

Multi threading in C++
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

42

Questions

1/3

Page

Pick an option on a question to see the right answer and solution.

What is multi-threading in C++?

Select an option to see the answer and solution.

Which header file is used for multi-threading in C++?

Select an option to see the answer and solution.

What is the maximum number of threads that can run concurrently in C++?

Select an option to see the answer and solution.

What is the purpose of the 'std::thread' class in C++ multi-threading?

Select an option to see the answer and solution.

Which of the following is a common synchronization primitive in C++ multi-threading?

Select an option to see the answer and solution.

What is a race condition in multi-threading?

Select an option to see the answer and solution.

Which function is used to join a thread in C++ multi-threading?

Select an option to see the answer and solution.

What is the purpose of the 'std::mutex' class in C++ multi-threading?

Select an option to see the answer and solution.

What is deadlock in multi-threading?

Select an option to see the answer and solution.

Which of the following is used to avoid race conditions in C++ multi-threading?

Select an option to see the answer and solution.

What is the purpose of the 'std::condition_variable' class in C++ multi-threading?

Select an option to see the answer and solution.

Which of the following is true about thread safety in C++ multi-threading?

Select an option to see the answer and solution.

What is the purpose of the 'std::atomic' class in C++ multi-threading?

Select an option to see the answer and solution.

Which of the following is used to implement a barrier in C++ multi-threading?

Select an option to see the answer and solution.

What is the purpose of the 'std::async' function in C++ multi-threading?

Select an option to see the answer and solution.

Which of the following is a thread management library in C++?

Select an option to see the answer and solution.

What is the purpose of the 'std::lock_guard' class in C++ multi-threading?

Select an option to see the answer and solution.

What is the purpose of the 'std::unique_lock' class in C++ multi-threading?

Select an option to see the answer and solution.

What is the purpose of the 'std::condition_variable_any' class in C++ multi-threading?

Select an option to see the answer and solution.

What is the purpose of the 'std::packaged_task' class in C++ multi-threading?

Select an option to see the answer and solution.