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
How to declare an array of pointers to integer?
what is a class? Explain with an example.
What is a friend function in c++?
What does namespace mean in c++?
What new()is different from malloc()?
Difference between strdup and strcpy?
Program to check whether a word is a sub-string or not of a string typed
C is to C++ as 1 is to a) What the heck b) 2 c) 10
What is type of 'this' pointer? Explain when it is get created?
Which one is a preferred language C or C++? Why?
Is string an object in c++?
Do inline functions improve performance?
Write about c++ storage classes?
What is the arrow operator in c++?
What do you mean by overhead in c++?