Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. What is the value of the following numerical expression?( ( ( 6 + ( ( 3 * 2 /

ID: 3615643 • Letter: 1

Question

 1. What is the value of the following numerical expression?( ( ( 6 + ( ( 3 * 2 / 3 ) + 1 ) % 2 ) / 2 ) % 3 )

2. How many times does the "t = t + k;" statement execute in the followingnested loops?for ( int t = 0, int i = -1; i < 4; i++ )for ( int j = 0; j < 3; ++j )for ( int k = 5; k > 2; k-- )t = t + k;

3. What values are stored in array "x" after the following statements areexecuted?int x[6] = { 0, 2, 3, 4, 5, 6 };x[0] = 9; x[1] = 4;for ( int i = 0; i < 5; i += 2 ) {x[i] = i;x[i + 1] = i - 1;}i--; ++i; x[--i] = 7;

4. What is the output of the following code segment?int x = 1;  int y = 2;  int z = 3;if ( ( x > y - 1 ) || ( z <= x * y ) )if ( x * y < z + y )cout << "one";elsecout << "two";elseif ( ( x != 2 ) && ( z == y + x ) )cout << "three";elsecout << "four";


And the most important:

5. Write a function that is passed an integer array of five elements, readsin the five values to be stored in the array from the standard input, andadds 15 to each of those numbers before storing them in the array. Put youranswer on the back of this page.

Explanation / Answer

x.