ANSI C rules for variable declaration

Lokesh Walase flokeshw24 at gmail.com
Fri Sep 21 00:45:01 EDT 2012


Hi all,

0.I read that ANSI C rules for variable declaration says that one must
declare the variables at the beginning of any scope block.
 C99 onwards we are allowed to declare variables as & how required.

1.NOW, my doubt is what happens in the actual "practical/real-world" codes
that are written in industry.
*Do everyone *strictly* follow the ANSI C rules & declare the variables at
the beginning of the scope ? *

2.Also , why are we still following that old rule ? *Is it so that old
codes of 70s can be used with new codes ?*

3.There must be some standard that all of us need to follow , so what are
they ?
This point is very crucial for free & open-source projects , where people
all around world write codes.

*Can any one redirect me to some links/tutorials for the same ?*

Regards,
free4freedom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120921/62804e03/attachment.html 


More information about the Kernelnewbies mailing list