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

There is no default Constructor

Is This Answer Correct ?    11 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #include ctype h in c++?

763


What are the two types of polymorphism?

682


Write a program to show polymorphism in C++?

725


What is the standard template library (stl)?

729


What is the use of register keyword with the variables?

636






What are the advantages of c++? Explain

682


Is java as fast as c++?

716


Is c++ a good first language to learn?

660


What is size_type?

634


What is meant by const_cast?

763


Differentiate between C and C++.

798


Explain how we implement exception handling in c++?

669


Why is c++ a mid-level programming language?

694


Out of fgets() and gets() which function is safe to use?

746


Can a class be static in c++?

675