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
What are put and get pointers?
Why should you learn c++?
Is python better than c++?
How does class accomplish data hiding in c++?
What is pure virtual function? Or what is abstract class?
What is function declaration in c++ with example?
What are c++ manipulators?
Is string data type in c++?
When you overload member functions, in what ways must they differ?
What is the v-ptr?
Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()
You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()
What is a terminating character in c++?
Why main function is special in c++?
What is const in c++?