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
Is c++ the hardest programming language?
Write a program and call it sortcheck.cpp which receives 10 numbers from input and checks whether these numbers are in ascending order or not. You are not allowed to use arrays. You should not define more than three variables
What is lambda in c++?
Difference between an inspector and a mutator
What is the exit function in c++?
What are the basic data types used in c++?
Do we have to use initialization list in spite of the assignment in constructors?
How the compilers arranges the various sections in the executable image?
What is cloning?
Differentiate between C and C++.
Explain queue. How it can be implemented?
They will ask u question about single linked list?. Write Code for to insert delete node.