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 / sampurna pandey

a,b,c,e

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you write a function similar to printf()?

661


How a new operator differs from the operator new?

615


What is the real purpose of class – to export data?

607


What is the keyword auto for?

562


What is the header file for setw?

568






What is runtime polymorphism in c++?

580


What are the differences between the function prototype and the function defi-nition?

605


If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?

605


Can we use this pointer inside static member function?

619


what is COPY CONSTRUCTOR and what is it used for?

612


How do you declare A pointer to function which receives an int pointer and returns a float pointer

670


What is the prototype of printf function?

637


What number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number

774


Explain container class.

681


What happens if a pointer is deleted twice?

781