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
A.undefined behavior arising when two threads access the same memory location concurrently with at least one write and no synchronization
B.a template providing indivisible read-modify-write operations on a variable so concurrent access is well defined without a lock
C.a synchronization primitive granting exclusive access to a shared resource, locked and unlocked to prevent concurrent data races
D.an object representing a single thread of execution that begins running its callable on construction and must be joined or detached
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"?
A.std::thread — undefined behavior arising when two threads access the same memory location concurrently with at least one write and no synchronization
B.std::thread — a synchronization primitive granting exclusive access to a shared resource, locked and unlocked to prevent concurrent data races
C.std::thread — a template providing indivisible read-modify-write operations on a variable so concurrent access is well defined without a lock
D.std::thread — an object representing a single thread of execution that begins running its callable on construction and must be joined or detached
5. Which term means: "a synchronization primitive granting exclusive access to a shared resource, locked and unlocked to prevent concurrent data races"?
8. Which term means: "a template providing indivisible read-modify-write operations on a variable so concurrent access is well defined without a lock"?
A.std::atomic — a template providing indivisible read-modify-write operations on a variable so concurrent access is well defined without a lock
B.std::atomic — a primitive that lets threads block until notified of a condition change, used with a lock to coordinate producers and consumers
C.std::atomic — undefined behavior arising when two threads access the same memory location concurrently with at least one write and no synchronization
D.std::atomic — an object representing a single thread of execution that begins running its callable on construction and must be joined or detached
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"?
A.std::condition_variable — a template providing indivisible read-modify-write operations on a variable so concurrent access is well defined without a lock
B.std::condition_variable — undefined behavior arising when two threads access the same memory location concurrently with at least one write and no synchronization
C.std::condition_variable — a synchronization primitive granting exclusive access to a shared resource, locked and unlocked to prevent concurrent data races
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
14. Which term means: "undefined behavior arising when two threads access the same memory location concurrently with at least one write and no synchronization"?
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.