Which header file is used for multi-threading in C++?
A. <mutex>
B. <condition_variable>
C. <thread>
D. <atomic>
Answer: Option C
A. <mutex>
B. <condition_variable>
C. <thread>
D. <atomic>
Answer: Option C
What is multi-threading in C++?
A. A process that allows parallel execution of tasks
B. A process that allows a single thread to execute
C. A process that allows multiple processes to execute concurrently
D. A process that allows multiple threads to execute concurrently
Which header file is used for multi-threading in C++?
A. <mutex>
B. <condition_variable>
C. <thread>
D. <atomic>
What is the maximum number of threads that can run concurrently in C++?
A. 2
B. Depends on the hardware and operating system
C. 4
D. 8
What is the purpose of the 'std::thread' class in C++ multi-threading?
A. To define thread-specific data
B. To manage thread priorities
C. To create and manage threads
D. To synchronize access to shared resources
Join The Discussion