Write the output
class Num
{
int x; float y;
public :
void init(void)
{
X=y=10;
}
void read(int i, float j)
{
x=i;
y= j;
}
void display()
{
cout<<” x => ” << x <<”\n”;
cout<<” y => ” << y <<”\n”;
}
};
void main()
{
Num obj1, obj2;
obj1.init();
obj2.init();
obj1.read(15 , 11.21);
obj1.display();
obj2.display();
}
Answers
Answered by
0
Explanation:
logic is of this program is unclear to me.
I tried to compile it...sharing the output.
it's throwing error(s)
Attachments:
Similar questions
Math,
1 month ago
Math,
1 month ago
Social Sciences,
1 month ago
Computer Science,
9 months ago
Math,
9 months ago