Question: 15
(Choose 1 answer)
How can you prevent data races in a multithreaded C++ program?
A. By using global variables
B. By using mutexes to synchronize access to shared resources
C. By detaching all threads
D. By limiting the number of threads to one