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 / gopinath das

a,b,c,d

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention the purpose of istream class?

705


Describe public access specifiers?

668


What is an object in c++?

695


What is a unnitialised pointer?

650


What is unary operator? List out the different operators involved in the unary operator.

676






Is map ordered c++?

688


What are libraries in c++?

691


What are virtual constructors/destructors?

648


Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

646


How a new element can be added or pushed in a stack?

678


Is it possible to pass an object of the same class in place of object reference to the copy constructor?

653


Explain how to initialize a const data member.

704


Write syntax to define friend functions in C++.

702


What is the basic concept of c++?

659


What is meant by entry controlled loop?

742