C++ Interview Questions in Bangalore
36 practice questions with answers for C++ interviews in Bangalore.
C++ jobs in Bangalore
Bangalore (Bengaluru) is India's largest technology hub, with global product companies, engineering centres, unicorn start-ups and big IT-services campuses. Product-company interviews here are usually deeper, with more scenario, design and hands-on rounds.
Below are 36 questions that match the mix of service, product and domain employers hiring junior c++ developers in Bangalore.
A C++ server crashes with a segmentation fault in production. How do you debug it?
Show answer
What is the difference between full and partial template specialization?
Show answer
How does std::condition_variable work and what are spurious wakeups?
Show answer
Write a swap function using references and explain why a pass-by-value version fails.
Show answer
A generic maxOf template gives wrong results when called with two C-style string literals. Why, and how do you fix it?
Show answer
What does the C++20 ranges library add?
Show answer
Group a list of words into anagram groups.
Show answer
List the gdb commands you would use to debug a crash.
Show answer
Is it expensive to return a large std::vector from a function by value?
Show answer
What does C++20 std::jthread add over std::thread?
Show answer
How would you choose between exceptions, error codes and std::expected for error handling?
Show answer
What is cache locality and why does it matter for performance?
Show answer
Should a Car class inherit from Engine or contain an Engine? Explain your choice.
Show answer
What is undefined behaviour in C++? Give examples.
Show answer
Show how std::format and std::print format output in modern C++.
Show answer
A function taking a Money object is silently called with an int and gives wrong results. What is happening?
Show answer
After calling std::move on a string, a teammate prints it and sees an empty value. Is this a bug?
Show answer
What is RAII and why is it central to C++?
Show answer
Why are templates usually defined in header files?
Show answer
What are templates in C++? Explain function and class templates.
Show answer
Implement a thread-safe blocking queue.
Show answer
A full build of your C++ project takes 40 minutes. How would you reduce it?
Show answer
Write a variadic function that sums any number of arguments and one that prints them.
Show answer
Why use nullptr instead of NULL or 0?
Show answer
What is the difference between delete and delete[]?
Show answer
Use a C++20 ranges pipeline to get squares of the first three even numbers.
Show answer
Write a C++ program that counts how often each word appears in the input.
Show answer
Reverse a singly linked list using pointers.
Show answer
Compare std::vector, std::list and std::deque.
Show answer
Describe a time you improved code quality by changing how memory was managed.
Show answer
Write a function that allocates a 2D matrix safely without raw new and delete.
Show answer
Tell me about a time when choosing a better data structure improved performance.
Show answer
A program that prints a million lines with std::endl is very slow. Why, and how do you fix it?
Show answer
Write a custom hash so a struct can be used as a key in std::unordered_map.
Show answer
Code that erases elements from a vector inside a range-based for loop crashes. Why, and what is the correct way?
Show answer
Companies with offices in Bangalore (18)
Microsoft
C++ interview questions
Hyderabad, Bengaluru, Noida +2
View questionsC++ interview questions
Bengaluru, Hyderabad, Gurugram +2
View questionsAmazon
C++ interview questions
Bengaluru, Hyderabad, Chennai +2
View questionsAdobe
C++ interview questions
Noida, Bengaluru, Gurugram
View questionsOracle
C++ interview questions
Bengaluru, Hyderabad, Noida +2
View questionsCisco
C++ interview questions
Bengaluru, Pune, Chennai
View questionsQualcomm
C++ interview questions
Hyderabad, Bengaluru, Chennai
View questionsNVIDIA
C++ interview questions
Pune, Bengaluru, Hyderabad
View questionsIntel
C++ interview questions
Bengaluru, Hyderabad
View questionsAMD
C++ interview questions
Bengaluru, Hyderabad
View questionsSamsung
C++ interview questions
Bengaluru, Noida, Delhi
View questionsTexas Instruments
C++ interview questions
Bengaluru
View questionsSiemens
C++ interview questions
Mumbai, Bengaluru, Pune
View questionsKPIT Technologies
C++ interview questions
Pune, Bengaluru
View questionsTata Elxsi
C++ interview questions
Bengaluru, Thiruvananthapuram, Chennai +1
View questionsDE Shaw
C++ interview questions
Hyderabad, Bengaluru, Gurugram
View questionsGoldman Sachs
C++ interview questions
Bengaluru, Hyderabad, Mumbai
View questionsMorgan Stanley
C++ interview questions
Mumbai, Bengaluru
View questionsFrequently asked questions
Which companies hire C++ professionals in Bangalore?
Companies with large offices in Bangalore include Microsoft, Google, Amazon, Adobe, Oracle, Cisco, Qualcomm, NVIDIA, Intel, AMD. Use their company pages below to practise employer-specific sets.
Are C++ interviews in Bangalore different from other cities?
The questions depend more on the company than the city. Bangalore's mix of employers decides the style: Product-company interviews here are usually deeper, with more scenario, design and hands-on rounds
How do I find C++ jobs in Bangalore?
Shortlist companies with Bangalore offices, keep your CV focused on C++ projects, apply on company career pages and job portals with the Bangalore filter, and practise the questions on this page before each interview.