I came across the following code in Advanced C: Tips and Techniques book.
main()
{
int a=3, b=4;
func(&a, &b);
}
func(pa, pb)
int *pa, *pb;
{
int m = 5, n = 6;
}
First time, I see this kind of function definition. When I compiled following is the warning/error
Anderson.c: In function ‘main’:
Anderson.c:8:2: warning: implicit declaration of function ‘func’ [-Wimplicit-function-declaration]
func(&a, &b);
^~~~
Anderson.c: At top level:
Anderson.c:11:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
func(pa, pb)
I know what these warnings are.
I'm here to know more about the way the author had defined the function. what would be the benefit of this & what's behind author's motive?
I don't see anything other than function name & arguments in different line.
I can just ignore as another gimmick, but the title of the book forced me to know from experts
before I ignore.