Using c99 style for loop