C program to find Smallest and Largest elements from One Dimensional Array Elements
This program will read 10 elements and find the smallest and largest elements from inputted One Dimensional Array Elements.
To find Smallest element from the Array - We will assume that first element is smallest and assign it in a variable and then compare each element from array with the variable, if any of the element is smaller than variable assign that element into variable, finally we will get smallest elements.
To find Largest element from the Array - We will assume that first element is largest and assign it in a variable and then compare each element from array with the variable, if any of the element is larger than variable assign that element into variable, finally we will get largest elements.
Find Smallest and Largest elements from One Dimensional Array using C program
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer