typedef Statement in C with program

Using typedef statement we can create new data type in c programming language.

typedef type name;


typedef int number;

Now we can use number as datatype, lets see:-

number n = 10;

WAP in C to Convert Hours in Minute and Secound

#define H 60
void main()
typedef int hours;
hours hrs;
printf(“Enter Hours : “);
scanf(“%d”, &hrs);
printf(“\nMinutes = %d”, hrs*H);
printf(“\nSecounds = %d”, hrs*H*H);


Leave a Reply

Your email address will not be published. Required fields are marked *