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
Can you write a function similar to printf()?
How a new operator differs from the operator new?
What is the real purpose of class – to export data?
What is the keyword auto for?
What is the header file for setw?
What is runtime polymorphism in c++?
What are the differences between the function prototype and the function defi-nition?
If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?
Can we use this pointer inside static member function?
what is COPY CONSTRUCTOR and what is it used for?
How do you declare A pointer to function which receives an int pointer and returns a float pointer
What is the prototype of printf function?
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
Explain container class.
What happens if a pointer is deleted twice?