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.

Answer Posted / sampurna pandey

a,b,c,e

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are put and get pointers?

584


Why should you learn c++?

587


Is python better than c++?

588


How does class accomplish data hiding in c++?

662


What is pure virtual function? Or what is abstract class?

594






What is function declaration in c++ with example?

550


What are c++ manipulators?

612


Is string data type in c++?

589


When you overload member functions, in what ways must they differ?

592


What is the v-ptr?

643


Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()

1009


You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()

594


What is a terminating character in c++?

770


Why main function is special in c++?

671


What is const in c++?

600