C Program To Find Second Largest Number
Posted on
C Program To Find Second Largest Number
Hfs explorer for windows. To find second highest element in array whose element is repeated, check for the program to find the second highest element in an array with repeating element.
C program to find the largest and second largest numbers present in an array along with their location index on the array. This program first find the largest number by going through all the numbers in the array. It stores the index of largest number on the variable pos1 and largest number is largest variable.
A second for loop is applied which also check for the largest number. When it hits on the largest found by first loop, it is bypassed using a continue statement and hence will get the second largest number.