C_Programming_Notes
C_Programming_Notes
C Character Set
The C character set includes letters (A-Z, a-z), digits (0-9), special symbols (+, -, *, /, etc.),
and white spaces.
Data Types
C has various data types including int, float, double, and char.
Constants
Constants in C include integer constants (10, 20), floating constants (10.5, 20.3), character
constants ('A', 'B'), and string constants ("Hello").
Escape Sequences
Escape sequences represent special characters in strings. Example: \n (new line), \t (tab), \
b (backspace).
Preprocessor Directives
Preprocessor directives are instructions processed before compilation, such as #include
and #define.
Symbolic Constants
Defined using #define or the const keyword. Example: #define PI 3.14.
Comments
Comments help in code documentation. Single-line comments use // and multi-line
comments use /* */.
sizeof Operator
The sizeof operator returns the memory size of a data type or variable. Example: sizeof(int)
returns 4 on a 32-bit system.