Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What constitutes a data race in C++?

  1. A Two threads accessing the same memory concurrently where at least one writes, without synchronisation
  2. B Any use of two threads
  3. C Two threads reading the same variable
  4. D Threads finishing at different times
Answer

Two threads accessing the same memory concurrently where at least one writes, without synchronisation

A data race is undefined behaviour, not merely a wrong value, so the compiler may optimise on the assumption it cannot occur.

All C++ MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as