What is the purpose of synchronization in multithreading?
A. To prevent threads from running concurrently
B. To prioritize certain threads over others
C. To speed up the execution of threads by running them in parallel
D. To ensure that only one thread accesses a shared resource at a time
Answer: Option D
Join The Discussion