ExamVeda
Login
Home
71
The concept of deciding which function to invoke during runtime is called . . . . . . . .
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
72
What is the order of Destructors call when the object of derived class B is declared, provided class B is derived from class A?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
73
What will be the output of the following C++ code?
#include <iostream>
#include <string>
using namespace std;
class A
{
	int a, b;
	float d;
   public:
	void change(int i){
		a = i;
	}
	void value_of_a(){
		cout<<a;
	}
};
 
class B: private A
{
 
};
 
int main(int argc, char const *argv[])
{
	B b;
	cout<<sizeof(B);
	return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
74
What are the things are inherited from the base class?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
75
What is the order of Constructors call when the object of derived class B is declared, provided class B is derived from class A?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
76
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
class polygon 
{
    protected:
    int width, height;
    public:
    void set_values (int a, int b)
    { 
        width = a; height = b;}
    };
    class output1 
    {
        public:
           void output (int i);
    };
void output1::output (int i) 
{
    cout << i << endl;
}
class rectangle: public polygon, public output1 
{
    public:
    int area ()
    { 
        return (width * height); 
    }
};
class triangle: public polygon, public output1 
{
    public:
    int area ()
    {
        return (width * height / 2); 
    }
};
int main () 
{
    rectangle rect;
    triangle trgl;
    rect.set_values (4, 5);
    trgl.set_values (4, 5);
    rect.output (rect.area());
    trgl.output (trgl.area());
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
77
Which symbol is used to create multiple inheritances?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
78
How many specifiers are used to derive a class?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
79
If a class is derived privately from a base class then . . . . . . . .
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
80
What is meant by multiple inheritance?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board