r/cpp_questions • • 1h ago

OPEN Getting better at C++ for coding interviews?

I dont mean Leetcode, but enough to be able to debug thoroughly, write out basic functions, etc. Not DSA, but just smaller code snippets, anywhere from 20-100 lines, where an interviewer says do this for me, or debug this.

How can I get better at that? right now I've mostly done coursework involving it (long time ago), but not much internship experience using cpp

3 Upvotes

3 comments sorted by

•

u/johnnyb2001 1h ago

If you want to learn to write out basic functions, then do it. Think of basic functions to write and variations of those basic functions and then do it. There’s also a million examples online from websites like w3 and so on. Debugging you can get good at by just understanding a few commands like breakpoints (lines, functions, conditional), run, continue, print, for loop, calling a function using call. These are all you need to know to get good at debugging.

•

u/el_bosteador 1h ago

Build something in c++. Ask AI to give you sample projects. What are your current c++ credentials that would land you an interview though?

•

u/BluejayOk2851 56m ago

a lot of job posts says c,cpp,python,java in tech stack. i’m more fluent in python and java, but sometimes for certain roles they make me write in c/cpp, which i can hold my own. but id like to get better.

which part of building projects can help me learn to implement functions or debugging?