#include<stdio.h>
int add(int,int);
main()
{
int a=2,b=3;
printf("%d %d %d",a,b,add(a,b));
getch();
}
int add(int a,int b)
{
int c;
c=a+b;
}
Ok fine this gives me output 2 3 5
..But for below program
#include<stdio.h>
int add(int,int);
main()
{
int a=2,b=3;
printf("%d %d %d",a,b,add(a,b));
getch();
}
int add(int a,int b)
{
int c;
c=a+b;
c=0;
}
Still it is giving 2 3 5
as output.. as we have no return
statement final statement c=0
not initializing .. it should give 2 3 0
but it is giving 2 3 5
only.