What will be the output of the following pseudo code for arr[] = 1, 2, 3, 4, 5…
PYQ Accenture Hiring Assessment 2024
What will be the output of the following pseudo code for arr[] = 1, 2, 3, 4, 5 ?
initialize i, n
initialize an array of size n
accept the values for the array
for i = 0 to n - 2
arr[i] = arr[i] + arr[i+1]
end for
print the array elements- A.
3 5 7 9 5
- B.
3 5 7 9 11
- C.
3 5 9 15 20
- D.
error
Attempted by 540 students.
Sign up free to check your answer
Sign up freeLoading lesson…

