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
Const char *p , char const *p What is the difference between the above two?
How can I learn dev c++ programming?
What are the extraction and insertion operators in c++? Explain with examples.
How can you quickly find the number of elements stored in a static array?
What is const pointer and const reference?
What is the difference between public, private, and protected access?
How do pointers work?
What are features of c++?
Why cstdlib is used in c++?
Explain Text Manipulation Routines?
When is the destructor called?
What is pair in c++?
What is a c++ class?
What is the this pointer?
What is a storage class?