How do I get a max value from Array List in C?
To get a maximum value from array list in C language
C is a general purpose programming language and the founder of C language is Dennis Ritchie in 1972. It is used for developing desktop application , developing system application etc.
In this discussion I will explain how we can get a maximum value from array list in C language. let's see step by step.
Step1 : Take a variable
Step2 : Take a size of array list.
Step3 : Calculate the size of array using sizeof() operator.
Step4 : Using loop that is for loop.
Step 5 :
- inside for loop I will check if arr[0]< arr[i]
- then arr[i] will stored in arr[0].
Comments
Post a Comment