Concurrency interview questions

15 real Concurrency questions from the C++ bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is std::thread?

Junior
  1. A.undefined behavior arising when two threads access the same memory location concurrently with at least one write and no synchronization
  2. B.a template providing indivisible read-modify-write operations on a variable so concurrent access is well defined without a lock
  3. C.a synchronization primitive granting exclusive access to a shared resource, locked and unlocked to prevent concurrent data races
  4. D.an object representing a single thread of execution that begins running its callable on construction and must be joined or detached
Reveal the answer + AI explanation — free account

2. Which term means: "an object representing a single thread of execution that begins running its callable on construction and must be joined or detached"?

Junior
  1. A.std::condition_variable
  2. B.std::atomic
  3. C.std::thread
  4. D.Data race
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.std::thread — undefined behavior arising when two threads access the same memory location concurrently with at least one write and no synchronization
  2. B.std::thread — a synchronization primitive granting exclusive access to a shared resource, locked and unlocked to prevent concurrent data races
  3. C.std::thread — a template providing indivisible read-modify-write operations on a variable so concurrent access is well defined without a lock
  4. D.std::thread — an object representing a single thread of execution that begins running its callable on construction and must be joined or detached
Reveal the answer + AI explanation — free account

4. What is std::mutex?

Mid
  1. A.a synchronization primitive granting exclusive access to a shared resource, locked and unlocked to prevent concurrent data races
  2. B.a primitive that lets threads block until notified of a condition change, used with a lock to coordinate producers and consumers
  3. C.undefined behavior arising when two threads access the same memory location concurrently with at least one write and no synchronization
  4. D.an object representing a single thread of execution that begins running its callable on construction and must be joined or detached
Reveal the answer + AI explanation — free account

5. Which term means: "a synchronization primitive granting exclusive access to a shared resource, locked and unlocked to prevent concurrent data races"?

Mid
  1. A.std::mutex
  2. B.std::atomic
  3. C.std::thread
  4. D.std::condition_variable
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Mid
  1. A.std::mutex — a synchronization primitive granting exclusive access to a shared resource, locked and unlocked to prevent concurrent data races
  2. B.std::mutex — an object representing a single thread of execution that begins running its callable on construction and must be joined or detached
  3. C.std::mutex — a template providing indivisible read-modify-write operations on a variable so concurrent access is well defined without a lock
  4. D.std::mutex — a primitive that lets threads block until notified of a condition change, used with a lock to coordinate producers and consumers
Reveal the answer + AI explanation — free account

7. What is std::atomic?

Senior
  1. A.a synchronization primitive granting exclusive access to a shared resource, locked and unlocked to prevent concurrent data races
  2. B.an object representing a single thread of execution that begins running its callable on construction and must be joined or detached
  3. C.a template providing indivisible read-modify-write operations on a variable so concurrent access is well defined without a lock
  4. D.a primitive that lets threads block until notified of a condition change, used with a lock to coordinate producers and consumers
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Senior
  1. A.std::atomic — a template providing indivisible read-modify-write operations on a variable so concurrent access is well defined without a lock
  2. B.std::atomic — a primitive that lets threads block until notified of a condition change, used with a lock to coordinate producers and consumers
  3. C.std::atomic — undefined behavior arising when two threads access the same memory location concurrently with at least one write and no synchronization
  4. D.std::atomic — an object representing a single thread of execution that begins running its callable on construction and must be joined or detached
Reveal the answer + AI explanation — free account

10. What is std::condition_variable?

Senior
  1. A.an object representing a single thread of execution that begins running its callable on construction and must be joined or detached
  2. B.a template providing indivisible read-modify-write operations on a variable so concurrent access is well defined without a lock
  3. C.undefined behavior arising when two threads access the same memory location concurrently with at least one write and no synchronization
  4. D.a primitive that lets threads block until notified of a condition change, used with a lock to coordinate producers and consumers
Reveal the answer + AI explanation — free account

11. Which term means: "a primitive that lets threads block until notified of a condition change, used with a lock to coordinate producers and consumers"?

Senior
  1. A.std::condition_variable
  2. B.Data race
  3. C.std::atomic
  4. D.std::thread
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Senior
  1. A.std::condition_variable — a template providing indivisible read-modify-write operations on a variable so concurrent access is well defined without a lock
  2. B.std::condition_variable — undefined behavior arising when two threads access the same memory location concurrently with at least one write and no synchronization
  3. C.std::condition_variable — a synchronization primitive granting exclusive access to a shared resource, locked and unlocked to prevent concurrent data races
  4. D.std::condition_variable — a primitive that lets threads block until notified of a condition change, used with a lock to coordinate producers and consumers
Reveal the answer + AI explanation — free account

13. What is Data race?

Mid
  1. A.a synchronization primitive granting exclusive access to a shared resource, locked and unlocked to prevent concurrent data races
  2. B.undefined behavior arising when two threads access the same memory location concurrently with at least one write and no synchronization
  3. C.an object representing a single thread of execution that begins running its callable on construction and must be joined or detached
  4. D.a template providing indivisible read-modify-write operations on a variable so concurrent access is well defined without a lock
Reveal the answer + AI explanation — free account

14. Which term means: "undefined behavior arising when two threads access the same memory location concurrently with at least one write and no synchronization"?

Mid
  1. A.std::mutex
  2. B.std::condition_variable
  3. C.std::thread
  4. D.Data race
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Mid
  1. A.Data race — a template providing indivisible read-modify-write operations on a variable so concurrent access is well defined without a lock
  2. B.Data race — a synchronization primitive granting exclusive access to a shared resource, locked and unlocked to prevent concurrent data races
  3. C.Data race — a primitive that lets threads block until notified of a condition change, used with a lock to coordinate producers and consumers
  4. D.Data race — undefined behavior arising when two threads access the same memory location concurrently with at least one write and no synchronization
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Concurrency free