C_Programming_Short_Notes
C_Programming_Short_Notes
1. Introduction to C:
C is a general-purpose programming language developed by Dennis Ritchie. It is widely used for system
#include <stdio.h>
int main() {
// Code
return 0;
3. Data Types in C:
- int: Integer
- char: Character
5. Operators in C:
- Arithmetic: +, -, *, /, %
6. Conditional Statements:
- switch statement
7. Loops in C:
- for loop
- while loop
- do-while loop
8. Functions in C:
Example:
return a + b;
10. Pointers in C:
Used to read/write files using functions like fopen, fclose, fprintf, fscanf, etc.
12. Advantages of C:
- Fast execution