While loop condition

is it necessary to have the updation condition of while loop at the end? can it be anywhere it a program?
eg:
x=0;
while(x<=10){
x=x+1;
statement 1;
.
.
.
}

hello @sakshi.saxena
no it is not necesssary , if u r never using x inside ur loop then u can place it anywhere otherwise its position depends on ur logic.