1 C Programming and Unix
1.C是最接近硬件和操作系统的,其次是C++和java
2 C Programming Preliminaries
C和C++
相同点 | 描述 |
---|---|
Conditionals | if and else |
Loops | while and for |
Basic Types | int, float, double, char |
Variable Declaration | 必须声明 |
Functions | function declaration is the same |
Arrays and Pointers | 数组和指针 |
不同点 | 描述 |
---|---|
No namespace | C没有namespace,所有东西都在同一个namespace |
No objects or advanced types | C没有String |
No function overloading | 没有方法重载 |
All functions are pass-by-value | 所有的都是值传递, |
Different Structures | |
Variable Scoping |
参考:
https://www.usna.edu/Users/cs/aviv/classes/ic221/s16/lec/04/lec.html