Friday 12 June 2009

Renaming of function in C programming




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("\

No comments:

Post a Comment