C
chellappa
hi All,
function automatically returns the value,am not used "return"
i am using Linux -gcc complier
please tell me.... what is problem...
source
=====
#include <stdio.h>
main()
{
int a,b,c,sum;
printf("ENTER ANY THREE NUMBERS :\n");
scanf("%d%d%d",&a,&b,&c);
sum=calsum(a,b,c);
printf("sum = %d\n", sum);
}
calsum(x,y,z)
int x,y,z;
{
int d;
d=x+y+z;
}
output
=====
ENTER ANY THREE NUMBERS :
23
23
23
sum = 69
Thanks All
by
chellappa
function automatically returns the value,am not used "return"
i am using Linux -gcc complier
please tell me.... what is problem...
source
=====
#include <stdio.h>
main()
{
int a,b,c,sum;
printf("ENTER ANY THREE NUMBERS :\n");
scanf("%d%d%d",&a,&b,&c);
sum=calsum(a,b,c);
printf("sum = %d\n", sum);
}
calsum(x,y,z)
int x,y,z;
{
int d;
d=x+y+z;
}
output
=====
ENTER ANY THREE NUMBERS :
23
23
23
sum = 69
Thanks All
by
chellappa