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

Is c++ fully object oriented?

547


Can we declare a base-class destructor as virtual?

577


how to connect with oracle 9i with server in socket program in c/c++

1844


What is :: operator in c++?

569


Does c++ have foreach?

519






What is the difference between the indirection operator and the address of oper-ator?

602


what is oops and list its features in c++?

538


Can you explicitly call a destructor on a local variable?

598


What are arrays c++?

600


What is increment operator in c++?

554


Why c++ is not a pure oop language?

551


What is the full form of dos?

560


Does dev c++ support c++ 11?

547


What is the output of the following program? Why?

618


List the features of oops in c++?

569