in first iteration value of i ll incrmeneted to 2 and while(b=!b) will make b=true in second iteration value of i ll incremented to 3 and now we know b was made true in first iteration but now b=!b will make b=false and while loop will end and i ll be printed 3.