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
What are the two main components of c++?
What is == in programming?
catch(exception &e) { . . . } Referring to the sample code above, which one of the following lines of code produces a written description of the type of exception that "e" refers to? a) cout << e.type(); b) cout << e.name(); c) cout << typeid(e).name(); d) cout << e.what(); e) cout << e;
Will c++ be replaced?
What are inline functions? What is the syntax for defining an inline function?
What is a c++ vector?
Define whitespace in C++.
What is a constructor initializer list and when we use constructor initializer list?
What is long in c++?
How do you establish a has-a relationship?
When you overload member functions, in what ways must they differ?
What are the popular tools used to detect memory leaks in c++