Wednesday 26 August 2009

typedef of function in c

In c we can typedef the function declaration. It is useful when function declaration is too complex and we have to give any simple name or if we have to create more numbers of function of the same type. typedef void govinda(int);void main(){    govinda one,two;    one(1);    two(2);    getch();}void one(int x){    printf("FROM ONE %d",x);}void two(int y){    printf("\nFROM TWO %d",y);}FROM ONE

No comments:

Post a Comment