I've almost always used C++ instead of straight C, but in C you have to declare your variables at the top of the function so the compiler knows what memory to allocate (I think). So you can't put your declaration in the for loop.
You can always tell when a developer spent a lot of time in C because they'll tend to put their variable declarations at the top of their function more than other.
Welcome to my life.. compiler yells so bad if you declare it later on and it won't run. Sometimes requires some awkward finagling to get it to run right. We use some proprietary BIOS IDE that I'm sure cost a lot of money but basically sucks ass - extremely limited, I may as well be typing up all my code in Notepad++ (and sometimes I do). We mostly use it because it had custom build hooks and shit that make the building process easy.
The writing out text as code is something a lot of people have to do first year or so I think. I think they want to see what bullshit you can remember, and not having access to the computer makes you think harder or something. I agree that it's terrible because you can't really run your code and see what it does, you just sort of have to guess.
Anecdotal but the worst example of this I ever had was a VHDL class. If you don't know what VHDL is, it's ok because mostly electrical/computer engineers use it to build virtual logic stuff. We were building a virtual 32-bit RISC machine on a spartan board and had to design the computer from the ground up - shadow registers, stack pointer, DRAM, ALU, keyboard buffer, VGA driver all this stuff designed by us. The professor wanted us to write, by hand, how to implement the VGA driver to our best ability. Knocked off absurd amount of points for bad syntax, functionality that didn't work, and other crazy shit. It was hard enough doing this project as is, but to do it on a test by hand was nuts. I got an A in the class, but that test made me hate the professor.
Most of my other classes let us write code on the lab PC's where the professor had some switch where he could cut off the internet. You were allowed to use your old source files, MUCH LIKE IN THE REAL WORLD, so that was good.