• Lecture 1: Intro/C program structure
• Lecture 2: Data types, operators and expressions
• Lecture 3: Simple input/output
• Lecture 4: Control flow
• Lecture 5: Functions
• Lecture 6: Pointers
• Lecture 7: Arrays
• Lecture 8: Character strings
• Lecture 9: Structures
• Lecture 10: Recursion
• Lecture 11: Algorithms and more advanced C
• Lecture 12: Revision of C
• Lecture 13: Object-Oriented Programming in C++
• Lecture 14: Inheritance
• Lecture 15: Polymorphism, STL templates
• Lecture 16: STL data structures
• Lecture 17: Memory management in C++
• Lecture 18: Structuring your code
• Lecture 19: Coding standards
• Lecture 20: CMake
lec1-20
mind!~ 头文件写没写
lec2:
Date Types:
how many memory cells are reserved for it
- Integers
- short (2 bytes – 16 bits)
- int (2 bytes?),64位机中为4 bytes
- long 32 bits (4 bytes)
- unsigned (2 bytes)
- unsigned short (2 bytes)
- unsigned long 32 bits (4 bytes)
- Floating Points
- float (4 byte, or 32 bits)
- double (8 bytes, or 64 bits)
- Characters
- 1 byte
- (128 distinct characters in the ASCII character set.)
- (Two C character types:
• char (1 byte or 8 bits, range: [–128, 127]
• unsigned char (1 byte or 8 bits, range: [0, 255])
- Integers
< data type > < name >
ASCII:
++i 返回值是(i+1);i++返回值是i (先加再返回和先返回再加)(返回指表达式值)
const
#define 替换
Full List of Operators with Precedence优先级:
计算时不同类型升级
printf()函数:
scanf()取地址
lec3:
example:
problem