Find and write the output of the following C++ program code:
Note: Assume all required header files are already being included in the program.
class Stock
{
long int ID;
float Rate; int Date;
public:
Stock(){ID=1001;Rate=200;Date=1;}
void RegCode(long int I,float R)
{
ID=I; Rate=R;
}
void Change(int New,int DT)
{
Rate+=New; Date=DT;
}
void Show()
{
cout<<'Date :'<<Date<<endl;
cout<<ID<<'#'<<Rate<<endl;
}
};
void main()
{
Stock A,B,C;
A.RegCode(1024,150);
B.RegCode(2015,300);
B.Change(100,29);
C.Change(20,20)
;
A.Show();
B.Show();
C.Show();
}
Output:
Date :1
1024#150
Date :29
2015#400
Date :20
1001#180