I think I managed to work out (through a bit of hacking and a bit of luck) mario pset1. In saying that I still don't understand why I wasn't required to declare variables at the top of the programme for rows, spaces and hashes. If someone could explain to me it'd be much appreciated. THANKS!!!]1
1 Answer
What exactly don't you understand? Is it that you were able to declare vars at any point in the program? If so, it's because there is no requirement in c to ddeclare them up front. They can be declared where needed, which helps to compartmentalize code - to put everything in one place where it's used so you don't have to go hunting around for all the parts.
Some languages may require all vars to be declared at the beginning, but c doesn't.
If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)