Cpp Programming 91 – Which of the following is an invalid visibility label while inheriting a class?
[B]. private[C]. protected
[D]. friend
Answer: Option D
Answer: Option D
Answer: Option B
Cpp Programming 92 – Which of the following keyword is used to overload an operator? Read More »
Cpp Programming, OOPs ConceptsAnswer: Option C
Cpp Programming 93 – Which of the following operators cannot be overloaded? Read More »
Cpp Programming, OOPs ConceptsAnswer: Option A
Cpp Programming 94 – Which of the following concepts is used to implement late binding? Read More »
Cpp Programming, OOPs ConceptsAnswer: Option D
Cpp Programming 95 – How many instances of an abstract class can be created? Read More »
Cpp Programming, OOPs ConceptsCpp Programming 96 – Which of the following is not the member of class? Read More »
Cpp Programming, OOPs ConceptsCpp Programming 97 – Which of the following is not a type of inheritance? Read More »
Cpp Programming, OOPs ConceptsAnswer: Option C
#include
class Point
{
int x, y;
public:
Point(int xx = 10, int yy = 20)
{
x = xx;
y = yy;
}
Point operator + (Point objPoint)
{
Point objTmp;
objTmp.x = objPoint.x + this->x;
objTmp.y = objPoint.y + this->y;
return objTmp;
}
void Display(void)
{
cout<< x << " " << y;
}
};
int main()
{
Point objP1;
Point objP2(1, 2);
Point objP3 = objP1 + objP2;
objP3.Display();
return 0;
}
[A]. 1 2
[B]. 10 20
Answer: Option C
Cpp Programming 100 – What will be the output of the following program? Read More »
Cpp Programming, Objects And Classes