A simple C problem.....
I have a problem related to a C program.
#include<stdio.h>
#include<conio.h>
int sum(int a,int b)
{
int c=a+b;
}
int main()
{
int a=5,b=2;
printf("%d",sum(a,b));
getch();
return 0;
}
Now, surprisingly the output is 7. I am not returning anything from the function. It should return garbage value. But how am i getting the correct output????