C++ Interview Questions in Chennai
36 practice questions with answers for C++ interviews in Chennai.
C++ jobs in Chennai
Chennai is a long-standing IT-services and SaaS hub along OMR, with strong demand for testing, data and support-engineering roles. Many companies here hire freshers in large batches and train them on the job.
Below are 36 questions that match the mix of service, product and domain employers hiring junior c++ developers in Chennai.
Which profiling tools do you use for C++ and what does each show?
Show answer
Write a minimal modern CMakeLists.txt for an app with a library and tests.
Show answer
Write a C++20 concept and use it to constrain a function.
Show answer
What are race conditions and data races?
Show answer
What is object slicing?
Show answer
How do you prioritise when a critical bug and a feature deadline arrive at the same time?
Show answer
After calling std::move on a string, a teammate prints it and sees an empty value. Is this a bug?
Show answer
Implement an LRU cache with get and put in O(1).
Show answer
What is a pointer and how is it different from a reference?
Show answer
What does the C++20 ranges library add?
Show answer
How would you choose between exceptions, error codes and std::expected for error handling?
Show answer
What is a deadlock and how do you prevent it?
Show answer
What is std::string_view and what are its pitfalls?
Show answer
A program that prints a million lines with std::endl is very slow. Why, and how do you fix it?
Show answer
Compare pass by value, pass by pointer and pass by reference.
Show answer
Should a Car class inherit from Engine or contain an Engine? Explain your choice.
Show answer
Sorting a vector of large objects is slow. What can you do?
Show answer
You parallelised a loop across eight threads but it became slower than the single-threaded version. What could be wrong?
Show answer
A function returns a string_view and callers sometimes print garbage. What is the likely bug?
Show answer
Using a custom struct as the key of an unordered_map gives a compile error. Why, and how do you fix it?
Show answer
Write an efficient function to check whether a number is prime.
Show answer
A function returns a reference to a local variable and the code sometimes works. Explain what is happening.
Show answer
What is the difference between new/delete and malloc/free?
Show answer
Write a program where two threads print odd and even numbers alternately up to 10.
Show answer
Use a C++20 ranges pipeline to get squares of the first three even numbers.
Show answer
What is the difference between an inline function and a macro?
Show answer
When would you use std::set versus std::priority_queue?
Show answer
Your program crashes with the message double free or corruption. What could cause it?
Show answer
Explain the rule of three, rule of five and rule of zero.
Show answer
What are memory alignment and padding?
Show answer
An asynchronous callback crashes intermittently. It is a lambda that captures local variables by reference. Explain the problem and fix.
Show answer
What are AddressSanitizer, UndefinedBehaviorSanitizer and ThreadSanitizer?
Show answer
What is a pure virtual function and an abstract class?
Show answer
Tell me about a time you designed the class structure for a module and how you handled review feedback.
Show answer
What are std::optional, std::variant and std::any?
Show answer
Companies with offices in Chennai (4)
Amazon
C++ interview questions
Bengaluru, Hyderabad, Chennai +2
View questionsCisco
C++ interview questions
Bengaluru, Pune, Chennai
View questionsQualcomm
C++ interview questions
Hyderabad, Bengaluru, Chennai
View questionsTata Elxsi
C++ interview questions
Bengaluru, Thiruvananthapuram, Chennai +1
View questionsFrequently asked questions
Which companies hire C++ professionals in Chennai?
Companies with large offices in Chennai include Amazon, Cisco, Qualcomm, Tata Elxsi. Use their company pages below to practise employer-specific sets.
Are C++ interviews in Chennai different from other cities?
The questions depend more on the company than the city. Chennai's mix of employers decides the style: Many companies here hire freshers in large batches and train them on the job
How do I find C++ jobs in Chennai?
Shortlist companies with Chennai offices, keep your CV focused on C++ projects, apply on company career pages and job portals with the Chennai filter, and practise the questions on this page before each interview.