problem with printing elements of a array using recursion program
there is some problem with the above code.....please find where it went wrong.......Code:#include<stdio.h>
void pa(int [],int,int);
int main()
{
int a[14]={10,20,30,40};
pa(a,0,3);
}
void pa(int a[],int lb,int ub)
{
if(lb==ub)
printf("%d",a[lb]);
else
{
printf("%d",a[lb]);
pa(a,lb+1,ub);
}
}