Initialize an integer array of size 10; pass it to a function ‘arrIncrement’ using a pointer. The function should increment all elements of the array by one. Then display the updated array on screen.code plz
1
Expert's answer
2018-02-12T07:36:38-0500
#include <iostream>
using namespace std;
const int SIZE = 10;
void arrIncrement(int* arr){ for(int i = 0; i < SIZE; ++i){ arr[i]++; } for(int i = 0; i < SIZE; ++i){ cout << arr[i] << " "; } cout << endl; }
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments