Tail recursion: Difference between revisions

Content deleted Content added
Undid revision 256171866 by 122.162.83.87 (talk)
Line 127:
*[[Course-of-values recursion]]
*[[Recursion (computer science)]]
Recursion function is call the function it self.
//coding in c language
#include<stdio.h>
#include<conio.h>
int fact(int);//Prototype
main()
{
int a,b;
clrscr();
printf("Enter the no");
scanf("%d",&a);
b=fact(a);// call the function
printf("Value of fact funtion");
getch();
}
int fact(int a)
{
int x;
if(a==0 || a==1)
return 1;
else
x=a*fact(a-1);//it is the Recursion function bcz function is call it self.
return x;
}
 
 
//by: Brij Bhushan Sharma
 
==References==