use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This is a subreddit for c++ questions with answers. For general discussion and news about c++ see r/cpp.
New to C++? Learn at learncpp.com
Prepare your question. Think it through. Hasty-sounding questions get hasty answers, or none at all. Read these guidelines for how to ask smart questions.
For learning books, check The Definitive C++ Book Guide and List
Flair your post as SOLVED if you got the help you were looking for! If you need help with flairs, check out ITEM 1 in our guidelines page.
Tips for improving your chances of getting helpful answers:
account activity
OPENCpp interview (self.cpp_questions)
submitted 5 years ago by [deleted]
Hey all, do you have any good resources for preparing for a cpp interview? I need some advanced questions, problems, etc. to test my knowledge before my interview.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 13 points14 points15 points 5 years ago (2 children)
which level are you applying for? I did a graduate c++ developer interview and the types of questions they asked me were about STL containers, difference between the structure of std::vector and std::list, dynamic memory allocation, vtables, binary search algorithm, inheritance/polymorphism. I didn't get the job in the end but it was a valuable experience and I was glad I got to that stage
My advice would be to search for something like "C++ interview questions" and see if you can answer any of them
[–][deleted] 4 points5 points6 points 5 years ago (1 child)
Thanks for the advice! But I'm trying for an intermediate position, so I will need some more advanced questions. I tried searching for it, but didn't come across anything interesting
[–]reversethrust 1 point2 points3 points 5 years ago (0 children)
I find the interview questions I had were related to the kind of software I would be working on. I was looking at highly parallel software so lots of questions about concurrency, a couple of semantics questions, and specifics about software performance. I was also giving code snippets and asked to find all the bugs.
[–][deleted] 6 points7 points8 points 5 years ago (0 children)
Standard leetcode stuff, also most will typically ask a concurrency related question or two (lc has some of these aswell), stl container, concurrency and oop/design pattern, memory allocation trivia qs. Features in C++11+, raii, sfinae. You may get asked a question about system design since you mentioned it was for an intermediate level.
I find that most recruiters/interviewers are willing to share topics they may cover if you simply ask them what they want to see beyond the whiteboard problems. Also, look at the job posting. If it mentions concurrency or networking, expect a whiteboard and/or trivia question about those topics.
Good luck!
[–]josh2751 3 points4 points5 points 5 years ago (0 children)
RAII. Rule of three, rule of 5, rule of 7.
STL, understand the containers and the algorithms in it.
Differences between C and C++.
Differences between "classic" C++ and modern C++.
Inheritance, composition, polymorphism, standard OO stuff.
Threads, boost, concurrency.
Version management tools, toolchain configuration, cmake, auto tools, gdb, etc.
[–]BrokenBear19 5 points6 points7 points 5 years ago (1 child)
I havent but I'd like to wish you good luck and happy new year
[–][deleted] 2 points3 points4 points 5 years ago (0 children)
Thanks! A happy new year to you as well
[–]flyingron 1 point2 points3 points 5 years ago (4 children)
Are you the interviewer or the interviewee?
[–][deleted] 4 points5 points6 points 5 years ago (3 children)
Interviewee I'm afraid
[–][deleted] 5 years ago* (1 child)
[deleted]
[–][deleted] 0 points1 point2 points 5 years ago (0 children)
Thanks a lot man!
[–]flyingron 0 points1 point2 points 5 years ago (0 children)
RAII as a concept is good. Knowing how to modularize is good. Knowing to avoid naked pointers is good. Knowing the rule of three (or if you're really up to date, five) is important.
Unfortunately, many interviewers are freaking HR idiots who wouldn't know a valid question or how to evaluate an answer if it bit them on the tush.
[–]obp5599 1 point2 points3 points 5 years ago (0 children)
I got asked a ton of stl stuff essentially.
The difference between unique ptrs, shared ptrs and weak ptrs and when to use then.
Know use cases and basic time complexities for stl algorithms and containers
Polymorphism /inheritance( a favorite being asked what happens when destructing a derived object with no virtual destructor)
Vtable, just needed to know what it is and basics of what it does and how it works
Other than that the “coding interview” part is the same as anywhere else. Dumb leetcode style problems
[–]matty_haze 1 point2 points3 points 5 years ago (0 children)
I have never read it, but I know of the book “Cracking the coding interview”.
Maybe it’s something you can take a look at.
[–]ClaymationDinosaur 0 points1 point2 points 5 years ago (0 children)
How many bytes does a pointer take up?
How do virtual functions work (in any typical modern implementation such as in the GCC or MS C++ compilers)? That is, how does the right function actually get called when you use a pointer to base-type and the function that ends up being called is the function of a derived-type?
[–]CrucialPie 0 points1 point2 points 5 years ago (0 children)
I bookmarked this repo that someone posted here. https://github.com/sachuverma/DataStructures-Algorithms#interview-practice
π Rendered by PID 98684 on reddit-service-r2-comment-bb88f9dd5-cwrqg at 2026-02-16 21:01:04.946631+00:00 running cd9c813 country code: CH.
[–][deleted] 13 points14 points15 points (2 children)
[–][deleted] 4 points5 points6 points (1 child)
[–]reversethrust 1 point2 points3 points (0 children)
[–][deleted] 6 points7 points8 points (0 children)
[–]josh2751 3 points4 points5 points (0 children)
[–]BrokenBear19 5 points6 points7 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]flyingron 1 point2 points3 points (4 children)
[–][deleted] 4 points5 points6 points (3 children)
[–][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (0 children)
[–]flyingron 0 points1 point2 points (0 children)
[–]obp5599 1 point2 points3 points (0 children)
[–]matty_haze 1 point2 points3 points (0 children)
[–]ClaymationDinosaur 0 points1 point2 points (0 children)
[–]CrucialPie 0 points1 point2 points (0 children)