The typedef is a keyword used in C programming to provide some meaningful names to the already existing variable in the c program. It behaves similarly as we define the alias for the commands. In short, we can say that this keyword is used to redefine the name of an already existing variable.
Syntax :
typedef <existing_name> <alias_name>
Example :
#include<stdio.h>
#include<conio.h>
int main()
{
typedef int unit;
unit i,j;
i=10;
j=20;
printf("Value of i is :%d",i);
printf("\nValue of j is :%d",j);
return 0;
}
0 Comments