Explanation : For the first time the first for loop will be executed completely, the content of array will be as follows :
5,3,4,6,2,1
After the second for executed completely the content of array will be as follows:
6,5,4,3,2,1
Array[3] = 3 so ans is 3 Because of the array will start from zero address .