What is the output of the following code?#includeint cat_number(int n){     int i,j,arr[n],k;     arr[0] = 1;     for(i = 1; i < n; i++)     {         arr[i] = 0;         for(j = 0,k = i - 1; j < i; j++,k--)         arr[i] += arr[j] * arr[k];     }     return arr[n-1];}int main(){     int ans, n = 8;     ans = cat_number(n);     printf("%d\n",ans);     return 0;}

Comments and Answers (2)

Vinay

Vinay

anyone have any solutions

Andy

Andy

What is the correct solution?

Avatar

{{SampleComment.userName || "Your Name"}} ~ {{SampleComment.userCity}}

{{SampleComment.commentValue || "Your Answer or Comment goes here...."}}