c++ how to find maximum value in an array code example Example: c++ max of array cout << " max element is: " << *max_element(array , array + n) << endl;