C++ Interview Questions and Answers
Prepare for your Interview today!
The default member and base-class access specifier are different.
Two.
There are two formats for initializers in C++ as shown in the example that follows. The first format uses the traditional C notation. The second format uses constructor notation.
int foo = 123;
int bar (123);
The throw operation calls the destructors for automatic objects instantiated since entry to the try block.
Default constructor WITH arguments class B { public: B (int m = 0) : n (m) {} int n; }; int main(int argc, char *argv[]) { B b; return 0; }
A constructor that accepts one argument of a different type.
Most helpful rated by users: