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
What are c++ redistributables?
Describe delete operator?
What is the extraction operator and what does it do?
How much do c++ programmers make?
What are the uses of typedef in a program?
Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c
Define stacks. Provide an example where they are useful.
What is ios flag in c++?
Explain abstraction.
On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?
What is c++ best used for?
What are the types of pointer?
Write a program to find the Fibonacci series recursively.
Can a program run without main?
Write a program which uses Command Line Arguments