why don't we use all variables as external variables in c?
why don't we use all variables as external variables in c?
Why would you want to? The extern keyword means the variable is defined in another file.
Do you really mean to ask why don't we make all variables global?
> why don't we use all variables as external variables in c?
Create a single global variable called 'i' and use if for ALL your loops.
Then report back.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.