Answer to Question #22011 in C# for Gudimella vathsalya
->actually for the above question u have answered the code as progrm thanku......but i need explanation for it and show output also
/* Include this header to use C++ input/output streams (cout, cin) */
/* This line of code allows you to call the functions
from the 'std' namespace without specifying their full name.
It means that you will be able to have access for example
to the C++ standard output stream writing 'cout' instead of 'std::cout' */
using namespace std;
/* This function increases every element of the given array by delta.
Note that we also pass the length of the array
for not to have the array overflow */
void increment_array_elements(int array, int arrayLength, int delta)
for (int c = 0; c < arrayLength; c++)
array[c] += delta;
int array; //declare an array of 10 integer values
/* Fill the array with the squares of indices of each array element */
for (int k = 0; k < 10; k++)
array[k] = k * k;
/* Increase each array element by 3 */
increment_array_elements(array, 10, 3);
for (int i = 0; i < 10; i++)
cout << array[i] << endl;
/* This function waits for the user input (a single key press).
When the key is pressed it's not displayed on the console.
It's a simple way to delay a program before exit */
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!