C Language CheatSheet | coding capsule by Vinay Prajapati
C Language CheatSheet
Basics
Basic syntax and functions from the C programming language.
Boilerplate Code
printf function
It is used to show output on the screen
scanf function
It is used to take input from the user
Comments
A comment is the code that is not executed by the compiler, and the programmer uses it to keep track of the code.
Single line comment
Multi-line comment
Data types
The data type is the type of data
Character type
Typically a single octet(one byte). It is an integer type
Integer type
The most natural size of integer for the machine
Float type
A single-precision floating-point value
Double type
A double-precision floating-point value
Void type
Represents the absence of the type
Escape Sequences
It is a sequence of characters starting with a backslash, and it doesn't represent itself when used inside string literal.
Alarm or Beep
It produces a beep sound
Backspace
It adds a backspace
Form feed
Newline
Newline Character
Carriage return
Tab
It gives a tab space
Backslash
It adds a backslash
Single quote
It adds a single quotation mark
Question mark
It adds a question mark
Octal No.
It represents the value of an octal number
Hexadecimal No.
It represents the value of a hexadecimal number
Null
The null character is usually used to terminate a string
Conditional Instructions
Conditional statements are used to perform operations based on some condition.
If Statement
If-else Statement
if else-if Statement
Switch Case Statement
It allows a variable to be tested for equality against a list of values (cases).

Comments
Post a Comment