MCQsAdvanced MCQsMulti-threadingMulti-threading 1).What is multi-threading in C++?1) Running multiple tasks concurrently2) Running a single task concurrently3) Executing multiple tasks sequentially4) None of the above 2).Which header file is required for multi-threading in C++?1) <thread>2) <mutex>3) <future>4) All of the above 3).What is the default number of threads in a C++ program?1) 12) 23) Depends on the hardware4) None of the above 4).Which of the following is used to create a thread in C++?1) std::thread2) std::task3) std::async4) std::run 5).What is the role of the 'join()' function in multi-threading?1) To pause the main thread until the thread completes2) To detach a thread from the main thread3) To cancel a thread4) None of the above 6).What is a 'detached' thread in C++?1) A thread that does not require joining2) A thread that terminates after execution3) A thread that runs in the background indefinitely4) None of the above 7).What happens when you call 'join()' on a thread twice?1) It throws an exception2) It joins the thread multiple times3) It causes undefined behavior4) None of the above 8).What is a race condition in multi-threading?1) A condition where multiple threads access shared data simultaneously2) A condition where no threads run simultaneously3) A condition where threads do not share data4) None of the above 9).How can you avoid race conditions in C++?1) By using mutexes2) By using semaphores3) By avoiding shared data4) All of the above 10).What is the purpose of 'std::async' in multi-threading?1) To run a function asynchronously2) To create a new thread3) To schedule a task for later execution4) None of the above