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