This question already has an answer here:
I see a lot of code with variables declared right after the function, but when I post something like that people end up mad and say it is better to declare them when they are used.
I assume this all compiles to the same executable, so it is simply a matter of style. As far as I can tell, pretty much all C code (99.9% that I've seen) declares them near the beginning and this is how it has been done for many years.
So why do people keep suggesting that they are declared closer to the block that uses them?