Introduction: Learn C: Introduction Cheatsheet
Introduction: Learn C: Introduction Cheatsheet
Learn C: Introduction
Syntax in C
The rules that dictate the correct format of code // Statements must end in a semicolon
for a speci!c programming language are known as
(;)
syntax.
Examples of syntax in C are: // correct
All statements must end with a semicolon, printf("Hello World!");
;
Keywords and other code elements are
case-sensitive // error
When compiling C code, an error will occur when printf("Hello World!")
the syntax of the code is incorrect.
// error
PRINTF("Hello World!");
Escape Sequences
/* This is a
block comment */
Print Share