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 the C-style character string?
What is enum class in c++?
What are the extraction and insertion operators in c++?
Ask to write virtual base class code?
What you know about structures in C++?
Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .
How is new() different from malloc()?
What are the various oops concepts in c++?
How to defines the function in c++?
Explain selection sorting. Also write an example.
What is the use of dot in c++?
Give 10 points of differences between C & C++.
What happens if a pointer is deleted twice?
How can you link a c program with a c function?
How can you quickly find the number of elements stored in a dynamic array? Why is it difficult to store linked list in an array?