Bhavesh
Bhavesh
#include<iostream.h>
#include<conio.h>
class Base
{
public:
void input()
{
cout<<endl<<"Honesty is the best policy.";
}
};
class Derived: public Base
{
public:
void input()
{
cout<<endl<<"People must choose their words wisely.";
}
};
void main()
{
Derived d;
clrscr();
d.input();
getch();
}
Output:
Source Code :
/* Name of programmer : Bhavesh Dewangan
Path of program : Turbo C++ */
clrscr();
total.printData();
getch();
}
Output:
Source Code :
/* Name of programmer : Bhavesh Dewangan
Path of program : Turbo C++*/
Output :
Source Code:
/* Name of programmer : Bhavesh Dewangan
Path of program : Turbo C++ */
//pointer to pointer
#include<iostream.h>
#include<conio.h>
void main()
{
int year;
clrscr();
int *yr= &year;
int **yrs = &yr;
cout<<endl<<"Enter current year: ";
cin>>year;
cout<<"Value stored in first pointer: "<<*yr;
cout<<endl<<"Value stored in second pointer: "<<**yrs;
getch();
}
Output :