While loop with empty body checking volatile ints – what does this mean?

Since x and y have been declared as volatile, the programmer expects that they will be changed from outside the program.

In that case, your code will remain in the loop

 while(x>y);

and will return the value x-y after the values are changed from outside such that x <= y. The exact reason why this is written can be guessed after you tell us more about your code and where you saw it. The while loop in this case is a waiting technique for some other event to occur.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)