Page Stats
Visitor: 605
C Typedef
Typedef statement is use to define a new data type that are equivalent to existing data type.
Exercise 1: Program to use User-defined type declaration (typedef)
#include<stdio.h>
#include<conio.h>
typedef int number;
void main()
{
typedef float real;
number a = 10;
real b = 10.123;
clrscr();
printf("A = %d\nB = %f",a, b);
getch();
}
A = 10
B = 10.123000
B = 10.123000