- 操作系统
- Unix
- MacOS
- Linux
- Ubuntu, Centos, Debian
- Windows
- Unix
- Terminal vs Shell
- iTerm2
- Zsh (Z Shell)
- 常用命令
mkdir
make directoryls
listcd
change directory- 相对路径、绝对路径
cp
copymv
moverm
removermdir
remove directoryclear
clearman
manual
- 快捷使用
ctrl+l
ctrl+a
ctrl+e
ctrl+u
https://code.visualstudio.com/
- Text editor vs IDE (Integrated development environment)
- JetBrains: GoLand, IntelliJ IDEA, PyCharm
- SublimeText
- Atom
- Language server
- 主题、插件
- 搜索
- 快捷键
Command/Ctrl + shift + p
命令Command/Ctrl + B
文件管理器Ctrl + `
内置终端
- CS50 lib
human → source code → compiler → machine code
correctness, design, style
#include <stdio.h>
int main(void)
{
printf("hello, world\n");
}
-
make, clang, gcc
-
分号
;
-
\n
-
header files - libraries
-
Data types
-
char
-
double
-
float
-
int
-
long
-
bool? C99
-
string ?
-
-
format code
%c
%s
%i
%f
%.2f
-
%%
-
=
assignment -
==
equal -
++
+=
-
%
求余、取模 -
Logical Operators
==
!=
!
||
&&
-
Conditionals
- If
- If … else …
- If … else if … else …
- switch…case…
?:
-
Loop
- while
- for
- do…while…
-
Magic Numbers
#define
-
Overflow
- 千年虫
- 2038-01-19
-
type casting
-
推荐书 <The C Programming Language>