I have written a C program where I declared a function reverse(int i)
. When I compile and run the program, it runs fine despite passing two arguments like this reverse((i++, i))
. Why doesn't this cause a syntax error? reverse
expects one argument.
#include <stdio.h>
void reverse(int i);
int main()
{
reverse(1);
}
void reverse(int i)
{
if (i > 5)
return ;
printf("%d ", i);
return reverse((i++, i));
}