PROGRAM TO FIND SECOND LARGEST ELEMENT IN ARRAY IN C

preview_player
Показать описание
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. Input : arr[] = {10, 5, 10} Output : The second largest element is 5.
Рекомендации по теме
Комментарии
Автор

This program will give logical error when we enter all the digit same

Hitesh-TheKisan
Автор

bro for -ve numbers this will not work

prabhavsharma