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
https://www.codecademy.com/learn/learn-c-introduction/modules/learn-c-introduction/cheatsheet 1/2
9/22/24, 11:36 PM Learn C: Introduction: Learn C: Introduction Cheatsheet | Codecademy
Comments in C
/* This is a
block comment */
Print Share
https://www.codecademy.com/learn/learn-c-introduction/modules/learn-c-introduction/cheatsheet 2/2