 Hello friends, I am Sanjay Gupta. In this video I am going to demonstrate you how you can find out maximum and second maximum from Bundy array. Before starting, you can note my information. You can watch or subscribe my YouTube channel through this link that is youtube.com slash sanjaygupta underscore tech school. You can download my programming app MacMS which is available on Google Play. Now coming onto the topic, here I am going to implement a program in C that will find out maximum and second maximum from Bundy array. So first I am including a header file that is stdio.h then main function. Inside main I am declaring an array then max variable. I am initializing it with 3, 2, 7, 6, 7 and s max variable. I am initializing it with minus 3, 2, 7, 6, 8. So these are the smallest values which are available in integer range. That's why I have initialized max and s max variable with these values. And fourth variable is i. Now I am using printf which will display the masses and enter 10 numbers. To receive 10 numbers I am implementing a for loop. This for loop will repeat the scan of statement and all 10 values will be stored inside a array at different indexes. Now I am implementing another for loop. Inside this for loop I am implementing if condition a of i is greater than max. So this condition will check whether array element is greater than max or not. So if this condition is true then a of i will become max and the current max will become second max. So first I am assigning max into s max and then I am assigning a of i into maximum. So the current maximum is assigned into second maximum and the a of i is assigned into max. So this is the first situation. If it is false then I am checking a of i with s max. So if a of i is not greater than max so it can be greater than s max but here with end logical operator I am checking that a of i is not equals to max. So if a of i is greater than s max it should not be equal to max. Then only a of i can be assigned into s max. So now you can recheck both the conditions. First condition says if a of i is greater than max then max will become s max and a of i will be becoming maximum. If this condition is false it means a of i is not greater than max so it can be greater than s max but if it is greater than second maximum then a of i should not be equals to maximum. So if it is true then a of i can be assigned into s max. After completion of this loop I can print both the values on console. So maximum equals to percenty max again printf slash n second maximum equals to percenty s max and then return zero. This is the complete implementation of the program which is finding out maximum and second maximum which are available in an array. So now I am executing this code. I am entering 10 numbers starting from 1 to 10. You can see the output it is showing maximum equals to 10 and second maximum equals to 9 which is correct. Anyway you can find out the maximum and the second maximum values which are available inside an array. I hope you have understood how you can implement this code in c programming. If you want to watch more programming related videos you can visit my youtube channel through this url youtube.com slash sanjaygupta underscore tax school. You can also download my android app based on programming that is TechMS which is available on google play. Thank you for watching this video.