This C program interchanges the smallest and the largest number in an array provided by the user.
The size of the array is also entered by the user.
Program: Interchange smallest and largest elements
Output:
Enter the number of elements: 6
Enter the elements: 45 23 53 57 84 71
The updated array after interchange is:
84 23 53 57 45 71
Do share your code in the comments to help others in easy learning.
Comment for queries.
Share on twitter.
Follow us on twitter.
For more articles, visit Programming Articles.