C program to find the maximum and minimum element of the array
Given an array arr[] of N integers, the task is to write the C program to find the maximum and minimum element of the given array iteratively and recursively.
Input: arr[] = {1, 2, 4, -1}
Output:
The minimum element is -1
The maximum element is 4
Input: arr[] = {-1, -1, -1, -1}
Output:
The minimum element is -1
The maximum element is -1
0 Comments