What are the difference between a K&R function declarartion and an ANSI function declaration?
+12
A:
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;
}
Wizard
2010-06-22 10:04:43
caf
2010-06-22 12:13:49
@caf No, I was using a nonstandard extension to the language :-)
Wizard
2010-06-22 12:46:19