C Language Notes
C Language Notes
Algorithm:
1. Start
3. Add them
4. Show result
5. End
2. Flowchart:
Example: A flowchart to add two numbers has Start, Input, Process, Output, and End symbols.
3. Flowchart Symbols:
4. History of C:
C was developed by Dennis Ritchie in 1972 at Bell Labs. It was made to write the UNIX OS.
5. Importance of C:
6. C Character Set:
Includes letters (A-Z, a-z), digits (0-9), symbols (+, -, *, etc.), and special characters.
7. C Tokens:
8. C Keywords:
Reserved words with special meaning. Example: int, return, if, else, for.
9. Identifier:
Rules:
- No keywords
10. Constant:
11. Variable:
- char: characters
- auto: default
int a = 10;
- \t: tab
- Header files
- main() function
- Variable declarations
- Statements
- %d: int
- %f: float
- %c: char
- %s: string
1. Start
2. Input A, B
3. Sum = A + B
4. Print Sum
5. End
Algorithm:
1. Start
2. Input P, R, T
3. SI = (P * R * T) / 100
4. Print SI
5. End