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.
Answers were Sorted based on User's Feedback
Explain the purpose of the keyword volatile.
When can I use a forward declaration?
What are arrays c++?
Write a program to find the Factorial of a number
Is it possible to have a recursive inline function in c++?
Explain linked list using c++ with an example?
Write is a binary search tree? Write an algo and tell complexity?
Will a catch statement catch a derived exception if it is looking for the base class?
Define friend function.
Why main function is special in c++?
Which function should be used to free the memory allocated by calloc()?
Explain the term memory alignment?