Q228
What is the output of the following code? #include int balanced_partition(int *arr, int len) int sm = 0, i, j; for(i = 0;i = arr[j - 1]) ans[i][j] = ans[i][j] || ans[i - arr[j - 1]][j - 1]; return ans[sm/2][len]; int main() int arr[] = 5, 6, 7, 10, 3, 1, len = 6; int ans = balanced_partition(arr,len); if(ans == 0) printf("false"); else printf("true"); return 0;
A.
True
AnswerB.
False
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board