public :
fixed_deposit() {}
fixed_deposit(long p, int y, float R = 0.12);
fixed_deposit(long p, int y, int r);
main()
{fixed_deposit FD1,FD2,FD3;
// defining and reading p, y, R and r here
FD1 = fixed_deposit(p,y,R); //parameter value
FD2 = fixed_deposit(p,y); // provided at run time
FD3 = fixed_deposit(p,y,r);
// displaying them here
class string
{ char *name;
int length;
public :
string() {length = 0;
name=new char[length +1]; }
string(char *s)
{length = strlen(s);
name=new char[length +1];
strcpy(name,s);}
void join(string & a, string & b)
{ length = a.length + b.length;
delete name; name = new char[length+1];
strcpy(name,a.name);
strcat(name,b.name); }
char *first=“This”; //In the main()
string name1(first),name2(“is”),name3(“testing”);
string s1,s2;
s1.join(name1,name2);
s2.join(s1,name3);
s2.display();
class matrix
{ int **p; int d1,d2;
public :
matrix(int x, int y)
{ d1 =x; d2 =y ; p = new int *[d1];
for (int i = 0 ; i < d1; ++i)
p[i] = new int[d2]; }
void get_element(int i,int j,int value)
{ p[i][j] = value}
int & put_element(int i, int j)
{ return p[i][j] }
}