So far, I know two styles:
/* 1st style */
int foo(int a) {
return a;
}
/* 2nd style */
int foo(a)
int a;
{
return a;
}
(I saw someone wri
There are (at least) two disadvantages when using the 2nd style:
Also, for better readability, you can put function's return type on its own line (especially useful with long-winded return types like unsigned long int and headers):
int
foo(int a)
{
return a;
}