Good Morning
09:12 am

Sponsor Area

Sponsor Area

Question is

Write the definition of a function AddUp(int Arr[], int N) in C++, in which all even positions (i.e. 0,2,4,...) of the array should be added with the content of the element in the next position and odd positions (i.e. 1,3,5,...) elements should be incremented by 10.

Example: if the array Arr contains

23 30 45 10 15 25

Then the array should become

53 40 55 20 40 35

NOTE:
● The function should only alter the content in the same array.
● The function should not copy the altered content in another array.
● The function should not display the altered content of the array.
● Assuming, the Number of elements in the array are Even.

Mock Test Series

Sponsor Area

Sponsor Area

NCERT Book Store

NCERT Sample Papers

Entrance Exams Preparation