Examveda

What is the purpose of the 'std::thread::hardware_concurrency()' function in C++ multi-threading?

A. To return the number of threads created by the program

B. To return the number of cores in the system

C. To return the number of hardware concurrency units supported by the implementation

D. To return the number of threads currently running

Answer: Option C


Join The Discussion

Related Questions on Multi threading in C plus plus

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