I can find smallest numbers in array of integer but How to find second, third, fourth, fifth smallest number i?
Code:#include <stdio.h> int main() { char array[5] = {4, 5, 9, 1, 2}; int smallest = array[0]; int i= 1; for (i=1; i<5; i++) { if (smallest > array[i]) { smallest = array[i]; printf (" %d", smallest); } } return 0; }