Printing array[array[i]]

if we have given an array of suppose size 4 and elements of array are;
input: 1 3 2 0
output : 3 0 2 1
means we need to find array[array[i]]:

but when I print it directly array[array[i]] without copying to temp array shows error/run time error .
please help me with this.

hello @manish99

pls save ur code at cb ide and share its link

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.