C++ track

C++ interview questions for freshers

Panel-ready C++ interview set questions for freshers and experienced developers. Practice at Coding Cadre in Faridabad, or Online from Delhi NCR.

5 Easy Pointers C++

What does new and delete do?

Short take Full answer on next page

Simple meaning

New allocates on the heap and calls constructors.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
10 Easy OOP C++

What does the virtual keyword do?

Short take Full answer on next page

Simple meaning

It enables dynamic dispatch through a vtable so the derived method runs on a base pointer.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
11 Easy Language C++

What is a header guard?

Short take Full answer on next page

Simple meaning

Ifndef define endif, or pragma once, stops a header from being included twice in one translation unit.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
12 Easy Language C++

What is a namespace?

Short take Full answer on next page

Simple meaning

It groups names to avoid clashes, like std.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
13 Easy Language C++

What does const on a method mean?

Short take Full answer on next page

Simple meaning

A const member function promises not to mutate the object, so it can be called on a const instance.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
15 Easy STL C++

Vector versus list?

Short take Full answer on next page

Simple meaning

List is a doubly linked list: stable iterators on insert, but poor cache use and no random access.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
17 Easy OOP C++

What is an abstract class in C++?

Short take Full answer on next page

Simple meaning

A class with at least one pure virtual function, written as virtual f() = 0.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
18 Easy Language C++

What is undefined behavior?

Short take Full answer on next page

Simple meaning

The standard gives no requirements, so the compiler may do anything: use-after-free, signed overflow, out-of-bounds.

Open the full page for Why, Steps, Example and Key takeaway.

Read full answer Example · Mistake · Say this
Page 1 of 4 Next
Chat with us