Finding an element in a rotated array using iterative approach

please help in this code,i can’t find any bug or error