class Foo {
const int x;
protected:
Foo(int f);
~Foo();
};
Foo f;
Referring to the sample code above, why will the class
declaration not compile?
a) The variable x is const.
b) The destructor is protected.
c) The destructor is not public.
d) The constructor is protected.
e) There is no default constructor.
Answers were Sorted based on User's Feedback
why is c++ called oops? Explain
What is Virtual Inheritance?
What is a responder chain?
How java is different from c and c++?
the first character in the variable name must be an a) special symbol b) number c) alphabet
Where must the declaration of a friend function appear?
How new/delete differs from malloc()/free?
Explain queue. How it can be implemented?
What is std :: endl?
What is namespace & why it is used in c++?
Is vector a class in c++?
What are the effects after calling the delete this operator ?