is that increment and decrement operations of for loop correct