Constructor Quiz-Asked in Interviews.

Placewit
Jan 20, 2022

--

Which of the followings is/are automatically added to every class, if we do not write our own?

A) Copy Constructor

B) Assignment Operator

C) A constructor without any parameter

D) All of the Above

Solution: D is correct

In C++, if we do not write our own, then compiler automatically creates a default constructor, a copy constructor and a assignment operator for every class.

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.

--

--

Placewit
Placewit

Written by Placewit

Upskilling students for tech placements!

No responses yet