Makefile 学习
## 1. make > make 是 Linux 自带的构建器,构建规则依赖于 makefile ## 2. makefile ### 2.1 命名 Makefile / makefile ### 2.2 规则 1. 目标、依赖、命令 目标:依赖 (tab)命令 ```make…
## 1. make > make 是 Linux 自带的构建器,构建规则依赖于 makefile ## 2. makefile ### 2.1 命名 Makefile / makefile ### 2.2 规则 1. 目标、依赖、命令 目标:依赖 (tab)命令 ```make…
1. 打开关闭: ```c // 打开成功返回地址,失败返回空 // w 文件存在清空打开,不存在新建 // r 不存在打开失败 // w+ 读写 // a 追加,存在则追加(光标放到文件末尾),不存在新建 FILE *fp = fopen("demo.txt", "w"); i…
### 9.1 作用域和生命周期 | 类型 | 作用域 | 生命周期 | | --------------- | -------- | ---------------- | | auto 变量 | 一对 {} | 当前函数 | | static 局部变量 | 一对 {} | 整个…
> 基础略 案例 — 遍历数组: ```c int arr[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; int *p = arr; // == int *p = &arr[0]; for (int i=0; i 2. 形参中的数组 int arr[],…
1. fgets() — 字符串输入 基本语法: ```c #include char *fgets(char *s, int size, FILE *stream); ``` 示例+细节: ```c #include char arr[100] = {0}; fgets(arr…
### 4.1 数组的基本使用: 语法: 类型名称 变量名[元素个数]; 走代码: ```c int arr[10]; // 只声明 arr[0] = 1; // 赋值 arr[10] = 11; // 数组越界(会导致运行时错误,谨慎!!!!) int arr1[3] = {1…
### 3.1 if 选择语句 ```c if( ... ) { // .... }else if( ... ) { // ... }else if ( ... ) { // ... }else { // ... } ``` ### 3.2 三目运算符 ```c int a = …
### 1.1 变量与常量 1. 常量 > 程序运行过程中,其值不能改变的量。一般出现在表达式和赋值语句中,如: ```c // 常量不能改变值 10 = 2; // err 'a' = 'b'; // err // ... // 10, 3.14 'd' "hello main…
Copyright 2019 我是菜鸟我想飞 . All Rights Reserved. Theme Elsa By Maine
https://s23.cnzz.com/z_stat.php?id=1275758743&web_id=1275758743