RE: Introduction to C Programming [Part 2: your first program] 01-14-2015, 06:56 PM
#4
(01-14-2015, 08:22 AM)DAKIMAKURAFAN2008 Wrote: Serious question, as every statement needs to be followed by a semicolon and functions must be within braces, why is the following not syntatically correct?\
Code:#include <stdio.h>; {; int main(int argc, char* argv){; printf("Hello World!); return 0; }; };
A semicolon by itself is a statement. It just happens to compile to nothing.
example:
Code:
for (;;);is the EXACT SAME AS
Code:
while (1) {}

























![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)