Learn C - Introduction - Learn C - Introduction Cheatsheet - Codecademy
Learn C - Introduction - Learn C - Introduction Cheatsheet - Codecademy
Learn C: Introduction
Syntax in C
The rules that dictate the correct format of code for a // Statements must end in a semicolon (;)
specific programming language are known as syntax.
// correct
Examples of syntax in C are:
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 the
syntax of the code is incorrect. printf("Hello World!")
// error
PRINTF("Hello World!");
Escape Sequences
/* This is a
block comment */
Print Share