Brief Summary of C

Statements in C end with a semicolon (;). C treats all whitespace as equivalent, so line breaks and indents are for readability only (with a couple of exceptions that won't matter here). Blocks of code are surrounded with braces, { and }.

Comment lines begin with the characters // and everything after that marker on a line is ignored. (This is one of the rare cases in C where a line break has a different meaning from other whitespace, because only a line break will end a // comment.) Comments can also be delimited by a starting /* and an ending */. Within those comments, a line break is like any other whitespace, and has no effect on the comment.

C code is run through a pre-processor before it is compiled. The main way in which ...

Get Find the Bug A Book of Incorrect Programs now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.