Computer Science, asked by leelavathy6008, 2 months ago

What will be the output of the following program? Write the answer in digits not alphabet.

#include<iostream>
using namespace std;
class TestDrive
{
int x;
public:
TestDrive(int xx)
{
x = xx;
}
int DriveIt(void);
};
int TestDrive::DriveIt(void)
{
static int value = 0;
int m;
m = x % 2;
x = x / 2;
if((x / 2)) DriveIt();
value = value + m * 10;
return value;
}
int main()
{
TestDrive TD(1234);
cout<< TD.DriveIt() * 10 << endl;
return 0;
}​

Answers

Answered by jha37731
1

Answer:

this is a question? I don't know this question

Similar questions