Learn basic concept of c , c++ and python programming in regularcodes.com

# Find the largest element of unsorted array in c?

## Example:

Suppose assume that following element are exist in unsorted array.

**Algorithm :**

Use one integer variable result and assign a first element of array. if result variable value are less than array element then assign new value to result variable. continue this process untill last element of array. And result are largest element of array.

## Accepted Output

Other example

Array data is : 23, 5, 21, 51, 111, 34, 12, 121, 44, 22, 113, 112

** Result is : [121] **

Array data is : 322, 444, 12, 66, 233, 466, 233, 11, 3, 4, 112, 443, 221

** Result is : [466] **

Time complexity of this program O(n)

Below in C implementation of this problem. Iterative approach.

## Code execution:

Find higher element of given array here includes execution process.

View comments and participate Discussion