What will be the output of the following pseudo-code for a given array…
PYQ Accenture Hiring Assessment 2023
What will be the output of the following pseudo-code for a given array a[5]=3,4,6,1,2 and pos=2 [note: n= size of the array i.e. 5 and starting array index is 0]
Declare i,j,n,pos
Repeat for j=pos to n-1
Set a[j]=a[j+1] [end of loop]
n=n-1;
Display the new array
End
- A.
3615
- B.
34215
- C.
3412
- D.
324615
Attempted by 225 students.
Sign up free to check your answer
Sign up freeLoading lesson…

