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
How do you initialize a string in c++?
What are default parameters? How are they evaluated in c++ function?
What is the difference between an external iterator and an internal iterator?
Do you know the problem with overriding functions?
Evaulate: 22%5 a) 2 b) 4 c) 0
When there is a global variable and local variable with the same name, how will you access the global variable?
What kind of problems can be solved by a namespace?
Can a class be static in c++?
What is binary search in c++?
What do nonglobal variables default to a) auto b) register c) static
Explain how to initialize a const member data.
What is purpose of new operator?
Is C++ case sensitive a) False b) Depends on implementation c) True
What is an inline function in c++?
What is bubble sort c++?