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 / alphare
a, d, e
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What are the different types of comments allowed in c++?
Can we sort map in c++?
Do class declarations end with a semicolon? Do class method definitions?
What is the main function c++?
Can a class be static in c++?
What is a string example?
Comment on c++ standard exceptions?
What is input operator in c++?
How are pointers type-cast?
Explain the pure virtual functions?
What is enum class in c++?
What is the latest version on c++?
What can c++ be used for?
On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?
Difference between delete and free.