Saved Bookmarks
| 1. |
Wap to print the sum of largest and 2nd largest value from array in program c |
Answer» Answer:Given an array of INTEGERS, our task is to write a program that EFFICIENTLY finds the second largest ELEMENT present in the array. Example: Input: arr[] = {12, 35, 1, 10, 34, 1} Output: The second largest element is 34. Explanation: The largest element of the array is 35 and the second largest element is 34 Input: arr[] = {10, 5, 10} Output: The second largest element is 5. Explanation: The largest element of the array is 10 and the second largest element is 5 Input: arr[] = {10, 10, 10} Output: The second largest does not exist. Explanation: Largest element of the array is 10 there is no second largest element I hope this was helpful to you and Mark me as Brainlist |
|