C program to find minimum value in an array
C program to find the minimum or the smallest element in an array. It also prints the location or index at which it occurs in the list of integers.
How to find smallest number in an array?
Our algorithm assumes the first element as the minimum and then compares it with other elements, if an element is smaller than it then it becomes the new minimum, and this process is repeated till complete array is scanned.
output:
Enter number of elements in array
3
Enter 3 integers
1
2
3
Minimum element is present at location 1 and its value is 1
need an explanation for this answer? contact us directly to get an explanation for this answer