Back To C++ Basic Index
typedef keyword can be used to give a new name to a datatype, in the code given below int datatype is given a new name integer and float keyword is given a new name decimal
//program to demonstrate typedef keyword (typedef keyword can be used to give a new name to a datatype) #include
#include
void main() { typedef int integer; typedef float decimal; integer a; decimal pi=3.14; clrscr(); cout<<"\nenter a value for a "; cin>>a; cout<<"\nvalue of a is "<