Function return value automatically

C

chellappa

hi
this program return value automatically ... how it is possible ..i am
not return any value... but i return correct values
i am using Linux -gcc complier
please tell me what is this
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;
dSD=x+y+z;
}

Output:
--=====
ENTER ANY THREE NUMBERS :
23
23
23
sum = 69

Thanks All
by
Chellappa
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top