C code to find minimum or smallest element present in an array. It also prints the location or index at which minimum element occurs in array. This can also be done by using pointers (see both the codes). Our algorithm first assumes first element as minimum and then compare 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.
-
Blogger Comment
-
Facebook Comment
Subscribe to:
Post Comments
(
Atom
)
0 comments :
Post a Comment