Question:
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 Share
{
long int Code;
float Rate;
int DD;
public:
Share(){Code=1000;Rate=100;DD=1;}
void GetCode(long int C,float R)
{
Code=C;
Rate=R;
}
void Update(int Change,int D)
{
Rate+=Change;
DD=D;
}
void Status()
{
cout<<"Date:"<<DD<<endl;
cout<<Code<<"#"<<Rate<<endl;
}
};
void main()
{
Share S,T,U;
S.GetCode(1324,350);
T.GetCode(1435,250);
S.Update(50,28);
U.Update(25,26);
S.Status();
T.Status();
U.Status();
}
C. Sir| Created: 1-Jan-2019 | Updated: 22-Mar-2026|CBSE12A-2016
