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
What do you mean by inheritance in c++?
How would you use qsort() function to sort an array of structures?
What is a block in c++?
why is iostream::eof inside a loop condition considered wrong?
Write bites in Turbo c++ Header ("Include") Files.
What is a buffer c++?
Difference between Abstraction and encapsulation in C++?
Write about the role of c++ in the tradeoff of safety vs. Usability?
What is the difference between delegation and implemented-in-terms-of?
Write about a nested class and mention its use?
What are pointer-to-members? Explain.
Can there be at least some solution to determine the number of arguments passed to a variable argument list function?
How important is c++?
What kind of problems can be solved by a namespace?
How java is different from c and c++?