Find The Second Highest Number In An Array | C Programming Example

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Sir, doesnt this approach fail if the highest no. occurs twice in the array in 0 and 1 indexes ?

mb
Автор

thank you so much this video helped me a lot :D

ece_diptabh_medhi
Автор

Thank man it's so easy after watching your video 😊

CalistheniVijay
Автор

Hey May I know why do we need to find the first highest and second highest number? Can't we just set both max1 and max2 to a[0] initially?

BebekKecap
Автор

Why do we need the "else if(a[i]>max2 && a[i]<max1)" statement????

If "a[i]<max1", wouldn't "max2" be automatically set to "a[i]"???

EDIT: I take back my words. Good explanation. Well done. 💯👌

hrishikeshkashyap
Автор

what if user input numbers?Is it same?

obrenvukasovic
Автор

Great explanation!! It would be better if u should an example on an unsorted array, and another example on what happens when a number is less than max1 but bigger than max2

bisanal-ghoul
Автор

Bahi questions largest two in array in c ?

ShivamKumar-rzuv
Автор

in for loop the i should be initialize to 0 and not 2.

gol.danime
Автор

whatever I do or did or anything or know or did not know and whatever I do or why and I will see more like whatever

ryanalnaser