Check out example codes for "c++ max of array". It will help you in understanding the concepts better.

Code Example 1

cout << " max element is: " << *max_element(array , array + n) << endl;

Code Example 2

*max_element (first_index, last_index);
ex:- for an array arr of size n
*max_element(arr, arr + n);

Learn ReactJs, React Native from akashmittal.com