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 / guest

a

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the best c++ ide?

593


Describe private, protected and public – the differences and give examples.

581


How do pointers work?

701


Does there exist any other function which can be used to convert an integer or a float to a string?

645


What is the use of seekg in c++?

592






Is there finally in c++?

610


How is c++ used in the real world?

567


Is map sorted c++?

507


Write about the members that a derived class can add?

562


What is the difference between an external iterator and an internal iterator?

607


Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.

3364


What is srand c++?

569


Explain linear search.

622


What is meant by iomanip in c++?

602


Refer to a name of class or function that is defined within a namespace?

593