// Program: iteration_template_c.cpp // Author: ... #include int main () { // Input const unsigned int len = 10; int a[len]; int* pte = a + len; for (int* i = a; i < pte; ++i) std::cin >> *i; // 4.c) Write a piece of code after which the pointer // max_ptr points to the largest element in the // array a. int* max_ptr = a; // [Your code ...] // Output 0 ... 0 *max_ptr 0 ... 0 for (int* i = a; i < pte; ++i) { if (i != max_ptr) std::cout << 0 << " "; else std::cout << *max_ptr << " "; } std::cout << "\n"; return 0; }