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

int func( int arr[], int n) { int result = 0, i = 0; for ( i = 0; i<n; i++) resu

ID: 3741448 • Letter: I

Question

int func( int arr[], int n)
{
int result = 0, i = 0;
for ( i = 0; i<n; i++)
result ^= arr[i];
return result;
}

6) What value will be returned if the function call is func(arr,5) while the passed array has elements 1,2,2,3 and 3 in it? (d) None of above 7) What does the function func do? (a) Get the first element from the array. (b) Count the number of elements in the array. (c) Remove pairs of elements with the same value from the array. (d) None of above 8) Assume 'A' has a ASCII code 65, i is an int type variable and has a value 2, c is a char type variable, so after the execution of c= 'A' +011. The value of c is: (a) D' (b) 68 (d) None of above

Explanation / Answer

6.

(a) 1

7.

It calculate the sum of elements of arrray by remove pairs of elements with same value from array

(d) None of above

8.

c = 'A' + 011 gives 'J'

c = 'A' + 2 gives 'C'

(d) None of above