On Jul 4, 2:38 pm, Faadu <alokchat...@gmail.com> wrote:
> In c , it is necessary to declare all variables at the beginning of
> the program.
> But surprisingly we can declare a variable anywhere within the code
> using gcc compiler.
> Can anyone explain me the reason for this strange behavior ??

C99 and C++ both allow declarations to be mixed with code.  Gcc allows
mixed declarations as an extension in C90 mode as well.   If you say
gcc -pedantic  file.c, you'll get a warning error about this.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to