In C89 and earlier, all block region variable declarations must appear before any statements. C99 changed this rule so that declarations and statements can be mixed up, as in C ++.
Unfortunately, Microsoft decided not to support C99 in Visual Studio and does not plan AFAIK.
source share