#### Related QuestionsVIEW ALL [5]

Write the definition of a function Change(int P[], int N) in C++, which should change all the multiples of 10 in the array to 10 and rest of the elements as 1. For example, if an array of 10 integers is as follows:

P[0] | P[1] | P[2] | P[3] | P[4] | P[5] | P[6] | P[7] | P[8] | P[9] |

100 | 43 | 20 | 56 | 32 | 91 | 80 | 40 | 45 | 21 |

After executing the function, the array content should be changed as follows:

P[0] | P[1] | P[2] | P[3] | P[4] | P[5] | P[6] | P[7] | P[8] | P[9] |

10 | 1 | 10 | 1 | 1 | 1 | 10 | 10 | 1 | 1 |

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.

Write a definition for a function SUMMIDCOL(int MATRIX [10], int N, int M) in C++, which finds the sum of the middle column's elements of the MATRIX (Assuming N represents a number of rows and M represents the number of columns, which is an odd integer).

Example: If the content of array MATRIX having N as 5 and M as 3 is as follows

1 | 2 | 1 |

2 | 1 | 4 |

3 | 4 | 5 |

4 | 5 | 3 |

5 | 3 | 2 |

The function should calculate the sum and display the following :

Sum of Middle Column: 15