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


Please Help Members By Posting Answers For Below Questions

Const char *p , char const *p What is the difference between the above two?

761


How can I learn dev c++ programming?

671


What are the extraction and insertion operators in c++? Explain with examples.

771


How can you quickly find the number of elements stored in a static array?

729


What is const pointer and const reference?

705






What is the difference between public, private, and protected access?

694


How do pointers work?

808


What are features of c++?

742


Why cstdlib is used in c++?

679


Explain Text Manipulation Routines?

724


When is the destructor called?

701


What is pair in c++?

710


What is a c++ class?

716


What is the this pointer?

718


What is a storage class?

749