Hi All,
Why the output of the following program is 0231??
Please resolve my doubt.
#include <iostream>
using namespace std;
class B
{
int data;
public:
B() { data =0;}
int func(){cout<<data++;return data++; }
};
int main()
{
B b;
cout<<b.func()<<b.func()<<endl;
return 2;
}