Cpp Programming 97 – Which of the following is not a type of inheritance?
[B]. Multilevel
[D]. HierarchicalAnswer: Option C
Answer: Option C
Answer: Option B
inherit parent class
[C].
are constructed
[D].
are destroyed
Answer: Option A
Explanation:
No answer description available for this question.
#include
int main()
{
int x = 10, y = 20;
int *ptr = &x;
int &ref = y;
*ptr++;
ref++;
cout<< x << " " << y;
return 0;
}
[A]. The program will print the output 10 20.
[B]. The program will print the output 10 21.
[C]. The program will print the output 11 20.
[D]. The program will print the output 11 21.
Answer: Option B
[B].
[C].
[D].
Answer: Option D
Explanation:
No answer description available for this question.
#include
void Tester(int xx, int yy = 5);
class IndiaBix
{
int x;
int y;
public:
void Tester(int xx, int yy = 5)
{
x = xx;
y = yy;
cout<< ++x % --y;
}
};
int main()
{
IndiaBix objBix;
objBix.Tester(5, 5);
return 0;
}
[A].The program will print the output 0.
[B].The program will print the output 1.
[C].The program will print the output 2.
[D].The program will print the output garbage value.
Answer: Option C