why does the output of value of b = 1 ?
I have below code:
Code:class test
{
int a;
public:
int b;
int geta();
};
int test::geta()
{
a=100; b=200; return a;
}
int main()
{
test obj;
cout<< "value of a:" <<obj.geta() <<" value of b:" <<obj.b <<'\n';
return 0;
}