#include<stdio.h>
int cat_number(int n)
{
int i,j,arr[n],k;
arr[0] = 1;
for(i = 1; i < n; i++)
{
arr = 0;
for(j = 0,k = i - 1; j < i; j++,k--)
arr += arr[j] * arr[k];
}
return arr[n-1];
}
int main()
{
int ans, n = 100;
ans = cat_number(n);
printf("%d\n",ans);
return 0;
}
a) Segmentation fault
b) Array size too large
c) Integer value out of range
d) Array index out of range
Which of the following errors will occur when the below code is executed?
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Which of the following errors will occur when the below code is executed?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!