preparing for the interview? confused about what the interviewer will ask from the programming point of view?
It’s a common fear that spread across many programmers before appearing in technical interviews.
let me speak about my experience as an IT professional with more than 100+ interviews (not every interview is given, many of them have taken as well).
as a smart IT professional (or soon to be) everyone should be aware of the frequent pattern of interview questions that are coming as a repeatable exercise.
While speaking of myself, as an interviewer, it is not that we are looking for some hard rock programmer or coder. instead, the interviewer always takes a higher chance to select the candidate with higher problem-solving skills and very neat and clear fundamentals.
So, here comes a list of c/c++ interview questions that are very very common (but important) and makes your interview experience top-notch by a very high chance of acceptance.
- c/c++ memory layout just explain by drawing or by explaining basic memory layout in details block by block
- storage classifier? auto/extern/register/static , explain in brief with their scope
- operator overloading/ function overloading , define one point difference with a small example
- constructor / destructor / copy constructor (deep/shallow) very important! make some small example and explain in brief
- process vs thread? what is difference explain the difference in detail
- how malloc & calloc works? what is difference , You might need to go in deep for explaining memory layout as well
- difference between free() & delete , give difference and let them know their origin
- what is a generic pointer , take a small example and go through it in
- call by value/reference/pointer , write a small piece of code to make it clear
- OOPS concepts , abstraction/encapsulation/polymorphism/ explain in brief
- virtualization (ptr/table concepts) , the very important and classy question, you must be prepared with a topic
- virtual function / pure virtual function / abstraction in c++ , give a small programme to explain it in details
- static / const / extern basic difference explain scope in details
- what is a void pointer? , explain in details with a small piece of code
- same static variable in different files, explain scope in detail? , take a small example to access both variables
- structure vs union? , explain by using memory allocation difference
- new and malloc()? , explain by using a memory allocation mechanism
- Assignment vs Copy constructor , explain by using a proper example
- Initialization List , how and where it’s been used, explain in brief
- hot to add/remove first/last/middle node from the linked list? need to be explained in details (take at least 10-15 minutes) with small program.
Feel free to share your thoughts and ideas in the comments.
All the best!