summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAwal Garg <awalGarg@users.noreply.github.com>2015-10-14 20:44:45 +0530
committerAwal Garg <awalGarg@users.noreply.github.com>2015-10-14 20:44:45 +0530
commit4599cd319fd409ddc697feffb607697285b26368 (patch)
treeebaef028d74ac2325a63c41208cef31424778da2
parent8ec133b29595b8dac963eafa63ab0c479e37a3c1 (diff)
[c/en] clarify common tripping point of newbies
int foo () { printf("bar\n"); int x; // this is not valid in C89+ }
-rw-r--r--c.html.markdown3
1 files changed, 3 insertions, 0 deletions
diff --git a/c.html.markdown b/c.html.markdown
index 3339032f..8d4cfd93 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -74,6 +74,9 @@ int main (int argc, char** argv)
///////////////////////////////////////
// Types
///////////////////////////////////////
+
+ // All variables MUST be declared at the top of the current block scope
+ // we declare them dynamically along the code for the sake of the tutorial
// ints are usually 4 bytes
int x_int = 0;