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
Can I learn c++ in a week?
Explain how would you handle a situation where you cannot call the destructor of a local explicitly?
Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.
How many standards of c++ are there?
Is arr and &arr are same expression for an array?
What is a container class? What are the types of container classes in c++?
Difference between pointer to constant and constant pointer to a constant. Give example.
Why do we need templates?
What are the advantages of using a pointer?
Can member functions be private?
Write about a nested class and mention its use?
Can I learn c++ without c?
What is implicit conversion/coercion in c++?
Is set c++?
What's the most powerful programming language?