Function declaration: K&R vs ANSI [duplicate]

K&R syntax is obsolete, you can skip it unless you have to maintain very old code.

// K&R syntax
int foo(a, p) 
    int a; 
    char *p; 
{ 
    return 0; 
}

// ANSI syntax
int foo(int a, char *p) 
{ 
    return 0; 
}

Leave a Comment