0
C program
Can you help me guys to find error.this program is based on user-defined functions. https://code.sololearn.com/ct4Q8tMCTUnT/?ref=app
2 odpowiedzi
+ 1
You are returning your counter 'c' within the first iteration. You have to return it after the loop has finished.
+ 1
Btw. you could replace 'n' with sizeof(arr) / sizeof(arr[0]) what would make it a little bit more robust.