C++ OOPS Multiple Choice Questions And Answers
Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:
List of Programming Full Forms
- int fun(int), int fun(float)
- int fun(int, int), float fun(int)
- float fun(int), float func(float)
- float fun(double), int fun(int, float)
- Sub dividing programs into sub small independent parts
- Wrapping data into single unit
- Hiding some parts of the code
- Overriding some parts of the program
#include
using namespace std;
class first
{
static int i;
int j;
};
int first::i;
int main()
{
cout << sizeof(first);
return 0;
}
- 4
- 2
- 1
- 8
using namespace std;
class Base {
public:
Base1()
{ cout << " Base's constructor called" << endl; }
};
class Derived: public Base {
public:
Derived()
{ cout << "Derived's constructor called" << endl; }
};
int ma
- Derived's constructor called Base's constructor called
- Base's constructor called Derived's constructor called
- Derived's constructor called
- Base's constructor called