C program to interchange the smallest and the largest elements of an array

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


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.

About ᴾᴿᴼᵍʳᵃᵐᵐᵉʳ

Linux and Python enthusiast, in love with open source since 2014, Writer at programming-articles.com, India.

View all posts by ᴾᴿᴼᵍʳᵃᵐᵐᵉʳ →

Leave a Reply

Your email address will not be published. Required fields are marked *