You are on page 1of 1

1.

Algorithm
2. Data Types:
- Basic ones: int (4 Bytes, -2^31 to 2^31-1 , the number -1 is explained for
the usage of [empty] ), float (real numbers: how to store?), char, bool
- Extended: double, long long …
- Input & output from/to : stdin, stdout
- Other expressions used for input and output: <<, >>, precision, width …
3. Operators
- Assignments: A = B
- Compound assignment: +=. -=, *=, /=, …
- Arithmetic ops: +, -, *, / (be careful when you divide! You should check the
data types as int/int = int, not float)
- Comparison: >, <, >=, <=, ==
- Increment/ Decrement: ++, -- …
4. Conditional statement
- If … else if … else …
5. Switch (int, char) case
6. Loops: (Be careful with the stopping condition)
- While
- Do … while: at least 1 time
- for
7. Functions (prototypes/declaration, implementation/definition))
- Call by value ( it copies the actual variable to a formal argument)
- Call by reference
8. String: ‘\0’ (this is termination null)
- Input % Output: cin>>str (shouldn’t use this), cin.get( _, _, _ )
- Str[i]: i is index number, [] is subscript operator

You might also like