Cpp Programming Quiz 254 – What will be the output of the following program?
[A].
99
[B].
ASCII value of 99
[C].
Garbage value
[D].
99.50
Answer: Option B
Explanation:
No answer description available for this question.
ASCII value of 99
[C].
Garbage value
[D].
99.50
Answer: Option B
Explanation:
No answer description available for this question.
Constructor cannot be inherited but the derived class can call them.
[C].
A constructor of a derived class cannot access any public and protected member of the base class.
[D].
Both A and B.
Answer: Option D
Explanation:
No answer description available for this question.
Answer: Option D
#include
class Bix
{
public:
int x;
};
int main()
{
Bix *p = new Bix();
(*p).x = 10;
cout<< (*p).x << " " << p->x << " " ;
p->x = 20;
cout<< (*p).x << " " << p->x ;
return 0;
}
[A].10 10 20 20
[B].Garbage garbage 20 20
[C].10 10 Garbage garbage
[D].Garbage garbage Garbage garbage
Answer: Option A
Answer: Option C
Answer: Option D