Let us consider the following program:
#include<stdio.h>
int test(a,b,c)
{
return a+b+c;
}
int main()
{
printf("%d\n",test(1,2,3));
printf("%d\n",test(1.5,2.2,2.3));
}
I didn't know that it is possible to specify functions in C without defining the types of its parameters. This is a feature of ANSI C? Can someone explain this to me?
I thought it was not possible to do that. However, my compiler can compile this program! In which situations I can do that?
Also, The program behaviour is a little weird. When I use integer values, the function does what we expect. However, when I use float parameters, the result is very different from what I would expect.