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 / alphare
a, d, e
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is main function in c++ with example?
How compile and run c++ program in turbo c++?
What are stacks?
What is endl?
Explain friend class?
You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()
what are the events occur in intr activated on interrupt vector table
What do you mean by volatile and mutable keywords used in c++?
What is an operator function? Describe the function of an operator function?
What is a container class? What are the types of container classes in c++?
What are abstract data types in c++?
What data encapsulation is in c++?
Can we use struct in c++?
How many types of modularization are there in c++?
Can we specify variable field width in a scanf() format string? If possible how?