Confused about why I am getting segmentation fault
Can you tell me why I am getting segmentation fault?
you need to increment count for only elements of array so in line 15, loop terminating condition would be i < n, not i <= m
Corrected code with comments