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.

41 Easy OOP C++

What is encapsulation in C++?

Short take Full answer on next page

Simple meaning

Hide data behind public methods with private fields.

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

Read full answer Example · Mistake · Say this
42 Easy Build C++

What is linking?

Short take Full answer on next page

Simple meaning

Combining object files and libraries into an executable or shared lib.

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

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

What does std::sort require?

Short take Full answer on next page

Simple meaning

Random access iterators and a strict weak ordering comparator.

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

Read full answer Example · Mistake · Say this
44 Easy Basics C++

What is a reference collapsing rule about?

Short take Full answer on next page

Simple meaning

In templates, combining & and && references collapses to a single reference type.

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

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

What is a virtual function table?

Short take Full answer on next page

Simple meaning

A per-class table of pointers to overridden methods.

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

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

What does emplace_back construct?

Short take Full answer on next page

Simple meaning

It constructs in place from arguments, avoiding a temporary.

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

Read full answer Example · Mistake · Say this
48 Easy Basics C++

What is ADL argument-dependent lookup?

Short take Full answer on next page

Simple meaning

Also called Koenig lookup — functions in associated namespaces of argument types are considered.

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

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

What is friend declaration for?

Short take Full answer on next page

Simple meaning

It grants access to private members to a function or class.

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

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

What does std::accumulate do?

Short take Full answer on next page

Simple meaning

It folds a range with an operation starting from an init value.

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

Read full answer Example · Mistake · Say this
53 Easy Basics C++

What is a dangling reference?

Short take Full answer on next page

Simple meaning

A reference to an object whose lifetime ended.

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

Read full answer Example · Mistake · Say this
54 Easy Build C++

What is a precompiled header?

Short take Full answer on next page

Simple meaning

A cached parse of common headers to speed compiles.

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

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

What is slicing?

Short take Full answer on next page

Simple meaning

Assigning Derived to Base by value drops derived parts.

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

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

What does std::copy_if do?

Short take Full answer on next page

Simple meaning

Copies elements matching a predicate to an output iterator.

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

Read full answer Example · Mistake · Say this
57 Easy Basics C++

What is constexpr if versus regular if?

Short take Full answer on next page

Simple meaning

Regular if needs both branches instantiable in templates sometimes

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

Read full answer Example · Mistake · Say this
59 Easy Errors C++

What is a core dump?

Short take Full answer on next page

Simple meaning

A file of memory at crash time for debugging.

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

Read full answer Example · Mistake · Say this
60 Easy Build C++

What is nm or dumpbin used for?

Short take Full answer on next page

Simple meaning

Inspecting symbols in object files and libs.

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

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