C++ track

C++ interview questions and answers

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

61 Moderate Templates C++

What is a trait class?

Short take Full answer on next page

Simple meaning

A template that carries type information or constants for algorithms.

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

Read full answer Example · Mistake · Say this
62 Moderate Errors C++

What is std::terminate?

Short take Full answer on next page

Simple meaning

Called when exception handling fails, like throw from destructor during unwind.

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

Read full answer Example · Mistake · Say this
63 Moderate Concurrency C++

What is std::future::get behavior?

Short take Full answer on next page

Simple meaning

It waits and returns the value or rethrows stored exception.

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

Read full answer Example · Mistake · Say this
66 Moderate Modern C++

What is std::bit_cast?

Short take Full answer on next page

Simple meaning

It reinterprets object representation safely for certain types.

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

Read full answer Example · Mistake · Say this
67 Moderate Errors C++

What is errno used for?

Short take Full answer on next page

Simple meaning

C library error codes after failing calls.

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

Read full answer Example · Mistake · Say this
68 Moderate Concurrency C++

What is std::jthread?

Short take Full answer on next page

Simple meaning

A joining thread that requests stop on destruction via stop_token.

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

Read full answer Example · Mistake · Say this
69 Moderate STL C++

What is std::span::subspan?

Short take Full answer on next page

Simple meaning

It returns a view into a portion without copying.

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

Read full answer Example · Mistake · Say this
70 Moderate Templates C++

What is if constexpr?

Short take Full answer on next page

Simple meaning

Compile-time branching discarded for false branches.

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

Read full answer Example · Mistake · Say this
73 Moderate Concurrency C++

What is std::barrier?

Short take Full answer on next page

Simple meaning

A reusable sync point where threads wait until all arrive.

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

Read full answer Example · Mistake · Say this
74 Moderate STL C++

What is std::ranges::filter_view?

Short take Full answer on next page

Simple meaning

A lazy view of elements matching a predicate.

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

Read full answer Example · Mistake · Say this
75 Moderate Errors C++

What is std::uncaught_exceptions used for?

Short take Full answer on next page

Simple meaning

Knowing if stack unwinding is in progress so destructors can avoid throwing.

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

Read full answer Example · Mistake · Say this
76 Moderate Modern C++

What is std::source_location?

Short take Full answer on next page

Simple meaning

It captures file, line, and function for logging without macros.

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

Read full answer Example · Mistake · Say this
77 Moderate Build C++

What is ccache?

Short take Full answer on next page

Simple meaning

A compiler cache for identical translations.

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

Read full answer Example · Mistake · Say this
79 Moderate Concurrency C++

What is std::counting_semaphore?

Short take Full answer on next page

Simple meaning

It limits concurrent access with a count.

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

Read full answer Example · Mistake · Say this
80 Moderate Modern C++

What is std::invoke?

Short take Full answer on next page

Simple meaning

It calls callables uniformly including pointers to members.

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

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