- #1
rclakmal
- 76
- 0
explain this C programme??
#include<stdio.h>
void func (int x);
void func(int x)
{
if (x>0)
func(x-1);
printf("%d",x);
}
int main()
{
func(4);
return 0;
}
this C programme gives the output of
0 1 2 3 4
can anyone explain me how this happens I am totally confused ...
#include<stdio.h>
void func (int x);
void func(int x)
{
if (x>0)
func(x-1);
printf("%d",x);
}
int main()
{
func(4);
return 0;
}
this C programme gives the output of
0 1 2 3 4
can anyone explain me how this happens I am totally confused ...