I have a piece of code like this:
#include <stdio.h>
int add(const int x, const int y);
int main()
{
printf("%d", add(9, 8));
return 0;
}
int add(int x, int y)
{
return x + y;
}
I forward declared the function "add" with const parameters after that i defined it without the const parameter, and when i compile it the compiler gives no complain.
The out put of the program is: 17. Why does this happen ?