 Hello friends, I am Sanjay Gupta. In this video I am going to demonstrate you how you can find out maximum value from a 1D array. Before starting, you can note my information. You can visit or subscribe my YouTube channel through this link youtube.com slash sanjaygupta underscore tech school. You can download my programming app Takamis which is available on google play. Now I am going to implement a code in C that will demonstrate you how you can find out maximum from a 1D array. So first I am including a header file that is stdio.h then inside main function I am declaring an array then a variable max and I am initializing it with 32768 which is the smallest number of integer range and then I variable. Now a message enter 10 numbers. To receive 10 numbers I am going to implement a for loop. This for loop will repeat scanf statement 10 times and the entered values will be stored inside a array at i index. So after this reading process I have to compare max variable with each element which are available inside an array. So for that purpose I am going to implement if condition. So I am including this scanf inside curly basis. After reading a particular element I am going to compare that element with max variable. So see this condition if a of i is greater than max. So a of i is array element if it is greater than maximum. So initially max is this number which is the smallest number. So if you are entering negative as well as positive numbers. So all the numbers will be greater than this number. No number is lesser than this number. That's why I have initialized max with this negative value which is the smallest value. So if a of i is greater than max then we have to assign a of i into max. So if this condition is true then only a of i will be assigned into max otherwise not. Now I am closing this for loop. So this for loop will receive a element in a of i position then that position will be compared with max and if it is true then a of i will be assigned into max. So this process will be performed 10 times. After completion of this loop max is max will be containing the maximum value. So to print that value I am using printf. So here message is maximum equals to and percenty will be replaced by the value of a max variable and then return zero. So this is the complete implementation of this program which is reading 10 elements and analyzing which number is maximum and that number will be assigned into max variable. Now I am executing this code. It is asking 10 numbers. So I am entering 10 random numbers. You can see the output. It is showing maximum equals to 9. So in the entire list 9 is the maximum value. So you can see the program is working properly. It is showing the maximum value which is available inside the array. So this way with the help of this program I hope you have understood how you can find out maximum value which are available inside the array. Notice that you have to initialize this max variable with negative value. If you don't do this or if you initialize it with zero and all the elements which are available inside array are negative values. So maximum will be zero only. So that's why I have initialized it with the lowest value of integer range that is minus 32768. If you want to watch more programming related videos you can visit my YouTube channel through this URL youtube.com slash sanjaygupta underscore tech school. You can also download my programming app Techimage which is available on Google Play. So keep connected with me and learn programming because programming is very easy. You can easily learn programming by continuous practice. So do practice learn programming. Thank you for watching this video.