yes, but you need add a special flag (-std=c99 or -std=gnu99) which can open a new can of worms (it's not active by default) - there's no reason to move the int declaration in the for statement to fix the issue at hand.