c language
Posted: Sun Jan 16, 2011 6:59 pm
CAN ANY BODY EXPLAIN ME THIS CODE . THANKS FOR ADVANCE WILL HELP
every body explains me line wise bcz i new to c language.
specially functions
tel me what is th mean of sumdig(int n)
sumdig(int n)// function defination
{
static int s=0;
int d;
if(n!=0)
{
d=n%10;
n=(n-d)/10;
s=s+d;
sumdig(n);
}
else
return(s);
}
{
static int s=0;
int d;
if(n!=0)
{
d=n%10;
n=(n-d)/10;
s=s+d;
sumdig(n);
}
else
return(s);
}
every body explains me line wise bcz i new to c language.
specially functions
tel me what is th mean of sumdig(int n)