All test case not passed

Hey @kushal1998 in the totalm function the terminating condition of the totalm is wrong
instead of i == sizeof(arr)/arr[0] - 1, i == sizeof(arr) -1, would come. So, replace if(i == sizeof(arr)/arr[0]-1) by
if(i == sizeof(arr) - 1)

yeah it workes … but when we need to find the size of array isnt it we do sizeof(arr)/arr[0]??

No, sizeof(arr) tells the size of array itself, dividing it by arr[0] makes no sense.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.