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
Mention the purpose of istream class?
Describe public access specifiers?
What is an object in c++?
What is a unnitialised pointer?
What is unary operator? List out the different operators involved in the unary operator.
Is map ordered c++?
What are libraries in c++?
What are virtual constructors/destructors?
Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
How a new element can be added or pushed in a stack?
Is it possible to pass an object of the same class in place of object reference to the copy constructor?
Explain how to initialize a const data member.
Write syntax to define friend functions in C++.
What is the basic concept of c++?
What is meant by entry controlled loop?