this code is not running
but this code is running.Code:#include<stdio.h> int pa(int [] ,int); main() { int a[4]={10,20,30,40}; pa(a,3); } int pa(int a[],int ub) { int k=0; printf("%d",a[k]); if(k!=ub) pa(a,k+1,ub); }
i think they should give the same output.Code:#include<stdio.h> int pa(int [],int ,int); main() { int a[4]={10,20,30,40}; pa(a,0,3); } int pa(int a[],int lb,int ub) { printf("\n%d",a[lb]); if(lb!=ub) pa(a,lb+1,ub); }