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

Describe private, protected and public?

602


Explain how an exception handler is defined and invoked in a Program.

586


What does flush do c++?

558


Which sort is best for the set: 1 2 3 5 4 a) Quick Sort b) Bubble Sort c) Merge Sort

664


Explain one-definition rule (odr).

649






What is the use of typedef?

640


What is data binding in c++?

508


What is bubble sort c++?

576


How important is c++?

532


What is abstraction in c++?

684


What is an adaptor class or wrapper class in c++?

609


Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.

619


Will this c++ program execute or not?

607


What is a local variable?

582


Why do we use classes in programming?

578