Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CSDN 技术社区
skill_tree_c
提交
3a25072d
S
skill_tree_c
项目概览
CSDN 技术社区
/
skill_tree_c
通知
24
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
skill_tree_c
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
“412ad816440a8c2e8b4a4f0c3a0e702749642cf4”上不存在“git@gitcode.net:RobotFutures/Paddle.git”
提交
3a25072d
编写于
10月 21, 2021
作者:
M
Mars Liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
makeup code block as c language if not assign
上级
37fe9750
变更
34
隐藏空白更改
内联
并排
Showing
34 changed file
with
184 addition
and
130 deletion
+184
-130
data/1.C语言初阶/1.C语言概述/1.C语言发展史/helloworld.md
data/1.C语言初阶/1.C语言概述/1.C语言发展史/helloworld.md
+4
-4
data/1.C语言初阶/1.C语言概述/2.C语言特点/features.md
data/1.C语言初阶/1.C语言概述/2.C语言特点/features.md
+4
-4
data/1.C语言初阶/2.数据类型/1.变量/variables.md
data/1.C语言初阶/2.数据类型/1.变量/variables.md
+4
-4
data/1.C语言初阶/2.数据类型/2.常量/constants.md
data/1.C语言初阶/2.数据类型/2.常量/constants.md
+4
-4
data/1.C语言初阶/2.数据类型/3.基本数据类型/basic_data_types.md
data/1.C语言初阶/2.数据类型/3.基本数据类型/basic_data_types.md
+4
-4
data/1.C语言初阶/3.运算符与表达式/1.赋值运算符与表达式/assignment_op.md
data/1.C语言初阶/3.运算符与表达式/1.赋值运算符与表达式/assignment_op.md
+4
-4
data/1.C语言初阶/3.运算符与表达式/2.算术运算符与表达式/arithmetic_op.md
data/1.C语言初阶/3.运算符与表达式/2.算术运算符与表达式/arithmetic_op.md
+4
-4
data/1.C语言初阶/3.运算符与表达式/3.关系运算符与表达式/relational_op.md
data/1.C语言初阶/3.运算符与表达式/3.关系运算符与表达式/relational_op.md
+4
-4
data/1.C语言初阶/3.运算符与表达式/5.逗号运算符与表达式/comma_op.md
data/1.C语言初阶/3.运算符与表达式/5.逗号运算符与表达式/comma_op.md
+4
-4
data/1.C语言初阶/3.运算符与表达式/6.条件运算符/conditional_op.md
data/1.C语言初阶/3.运算符与表达式/6.条件运算符/conditional_op.md
+4
-4
data/1.C语言初阶/3.运算符与表达式/7.sizeof运算符/sizeof_op.md
data/1.C语言初阶/3.运算符与表达式/7.sizeof运算符/sizeof_op.md
+4
-4
data/1.C语言初阶/3.运算符与表达式/8.运算符优先级与求值顺序/precedence.md
data/1.C语言初阶/3.运算符与表达式/8.运算符优先级与求值顺序/precedence.md
+4
-4
data/1.C语言初阶/4.语句与控制流/1.语句与程序块/statements_n_blocks.md
data/1.C语言初阶/4.语句与控制流/1.语句与程序块/statements_n_blocks.md
+4
-4
data/1.C语言初阶/4.语句与控制流/2.判断语句/elseif.md
data/1.C语言初阶/4.语句与控制流/2.判断语句/elseif.md
+4
-4
data/1.C语言初阶/4.语句与控制流/2.判断语句/if.md
data/1.C语言初阶/4.语句与控制流/2.判断语句/if.md
+4
-4
data/1.C语言初阶/4.语句与控制流/2.判断语句/ifelse.md
data/1.C语言初阶/4.语句与控制流/2.判断语句/ifelse.md
+4
-4
data/1.C语言初阶/4.语句与控制流/2.判断语句/switch.md
data/1.C语言初阶/4.语句与控制流/2.判断语句/switch.md
+4
-4
data/1.C语言初阶/4.语句与控制流/3.循环语句/for.md
data/1.C语言初阶/4.语句与控制流/3.循环语句/for.md
+4
-4
data/1.C语言初阶/4.语句与控制流/3.循环语句/goto.md
data/1.C语言初阶/4.语句与控制流/3.循环语句/goto.md
+4
-4
data/1.C语言初阶/4.语句与控制流/3.循环语句/while.md
data/1.C语言初阶/4.语句与控制流/3.循环语句/while.md
+4
-4
data/2.C语言中阶/1.函数与程序结构/2.函数的参数/parameter_n_argument.md
data/2.C语言中阶/1.函数与程序结构/2.函数的参数/parameter_n_argument.md
+4
-4
data/2.C语言中阶/1.函数与程序结构/3.函数的返回/return.md
data/2.C语言中阶/1.函数与程序结构/3.函数的返回/return.md
+5
-5
data/2.C语言中阶/1.函数与程序结构/5.函数的递归/recursion.md
data/2.C语言中阶/1.函数与程序结构/5.函数的递归/recursion.md
+4
-4
data/2.C语言中阶/2.数组/1.数组简介/array_def.md
data/2.C语言中阶/2.数组/1.数组简介/array_def.md
+4
-4
data/2.C语言中阶/2.数组/2.一维数组/bubble_sort.md
data/2.C语言中阶/2.数组/2.一维数组/bubble_sort.md
+4
-4
data/2.C语言中阶/2.数组/3.二维数组/matrix.md
data/2.C语言中阶/2.数组/3.二维数组/matrix.md
+4
-4
data/2.C语言中阶/2.数组/4.变长数组/vla.md
data/2.C语言中阶/2.数组/4.变长数组/vla.md
+4
-4
data/2.C语言中阶/3.指针/1.指针与地址/pointers.md
data/2.C语言中阶/3.指针/1.指针与地址/pointers.md
+4
-4
data/2.C语言中阶/3.指针/2.指针与函数参数/pointers_n_func.md
data/2.C语言中阶/3.指针/2.指针与函数参数/pointers_n_func.md
+4
-4
data/2.C语言中阶/3.指针/3.指针与数组/pointers_n_array.md
data/2.C语言中阶/3.指针/3.指针与数组/pointers_n_array.md
+4
-4
data/2.C语言中阶/3.指针/4.地址算术运算/pointers_arithmetic_op.md
data/2.C语言中阶/3.指针/4.地址算术运算/pointers_arithmetic_op.md
+4
-4
data/2.C语言中阶/3.指针/7.指向函数的指针/pointers_2_func.md
data/2.C语言中阶/3.指针/7.指向函数的指针/pointers_2_func.md
+4
-4
data/3.C语言高阶/3.位运算/1.位和字节/check.json
data/3.C语言高阶/3.位运算/1.位和字节/check.json
+7
-0
src/main.py
src/main.py
+48
-1
未找到文件。
data/1.C语言初阶/1.C语言概述/1.C语言发展史/helloworld.md
浏览文件 @
3a25072d
...
...
@@ -3,7 +3,7 @@
输出 "Hello, World!" 字符串,找出正确的选项。
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -17,7 +17,7 @@ int main()
### A
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -29,7 +29,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -41,7 +41,7 @@ int main()
### C
```
```
c
#include <stdio.h>
int
main
...
...
data/1.C语言初阶/1.C语言概述/2.C语言特点/features.md
浏览文件 @
3a25072d
...
...
@@ -3,7 +3,7 @@
使用字符数组在控制台打印C语言的常见特点。请选出正确答案。
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -32,7 +32,7 @@ int main()
### A
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -59,7 +59,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -86,7 +86,7 @@ int main()
### C
```
```
c
#include <stdio.h>
int
main
()
...
...
data/1.C语言初阶/2.数据类型/1.变量/variables.md
浏览文件 @
3a25072d
...
...
@@ -3,7 +3,7 @@
使用while循环修改变量值,依次打印10以内(包含10)所有正整数的平方。请从以下选项中找出正确答案。
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -28,7 +28,7 @@ int main()
### A
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -51,7 +51,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -74,7 +74,7 @@ int main()
### C
```
```
c
#include <stdio.h>
#include <stdbool.h>
...
...
data/1.C语言初阶/2.数据类型/2.常量/constants.md
浏览文件 @
3a25072d
...
...
@@ -3,7 +3,7 @@
使用常量表示圆周率$
\p
i$,并计算半径为2的圆的面积。请从以下选项中找出错误答案。
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -23,7 +23,7 @@ int main()
### A
```
```
c
#include <stdio.h>
#define PI 3.14
...
...
@@ -41,7 +41,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -58,7 +58,7 @@ int main()
### C
```
```
c
#include <stdio.h>
#define PI 314e-2
...
...
data/1.C语言初阶/2.数据类型/3.基本数据类型/basic_data_types.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdbool.h>
#include <stdio.h>
...
...
@@ -34,7 +34,7 @@ int main()
### A
```
```
c
#include <stdbool.h>
#include <stdio.h>
...
...
@@ -62,7 +62,7 @@ int main()
### B
```
```
c
#include <stdbool.h>
#include <stdio.h>
...
...
@@ -90,7 +90,7 @@ int main()
### C
```
```
c
#include <stdbool.h>
#include <stdio.h>
...
...
data/1.C语言初阶/3.运算符与表达式/1.赋值运算符与表达式/assignment_op.md
浏览文件 @
3a25072d
...
...
@@ -3,7 +3,7 @@
实现三个变量的赋值操作,并输出三个变量的值。请选出错误答案。
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -21,7 +21,7 @@ int main()
## 选项
### A
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -38,7 +38,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -58,7 +58,7 @@ int main()
### C
```
```
c
#include <stdio.h>
int
main
()
...
...
data/1.C语言初阶/3.运算符与表达式/2.算术运算符与表达式/arithmetic_op.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
#define UPPER 100
...
...
@@ -24,7 +24,7 @@ int main()
### A
```
```
c
#include <stdio.h>
#define UPPER 100
...
...
@@ -42,7 +42,7 @@ int main()
### B
```
```
c
#include <stdio.h>
#define UPPER 100
...
...
@@ -60,7 +60,7 @@ int main()
### C
```
```
c
#include <stdio.h>
#define UPPER 100
...
...
data/1.C语言初阶/3.运算符与表达式/3.关系运算符与表达式/relational_op.md
浏览文件 @
3a25072d
...
...
@@ -3,7 +3,7 @@
输入两个闭区间,并判断两个区间是否重叠。请选出错误答案。
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -28,7 +28,7 @@ int main()
### A
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -51,7 +51,7 @@ int main()
### B
```
```
c
#include <stdio.h>
#define MAX(a,b) ((a > b) ? a : b)
...
...
@@ -77,7 +77,7 @@ int main()
### C
```
```
c
#include <stdio.h>
#define MAX(a,b) ((a > b) ? a : b)
...
...
data/1.C语言初阶/3.运算符与表达式/5.逗号运算符与表达式/comma_op.md
浏览文件 @
3a25072d
...
...
@@ -7,7 +7,7 @@
请选出正确答案。
## 答案
```
```
c
#include <stdio.h>
#define FIRST_COST 6
#define NEXT_COST 2
...
...
@@ -30,7 +30,7 @@ int main()
### A
```
```
c
#include <stdio.h>
#define FIRST_COST 6
#define NEXT_COST 2
...
...
@@ -51,7 +51,7 @@ int main()
### B
```
```
c
#include <stdio.h>
#define FIRST_COST 6
#define NEXT_COST 2
...
...
@@ -72,7 +72,7 @@ int main()
### C
```
```
c
#include <stdio.h>
#define FIRST_COST 6
#define NEXT_COST 2
...
...
data/1.C语言初阶/3.运算符与表达式/6.条件运算符/conditional_op.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -23,7 +23,7 @@ int main()
## 选项
### A
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -41,7 +41,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -59,7 +59,7 @@ int main()
### C
```
```
c
#include <stdio.h>
int
main
()
...
...
data/1.C语言初阶/3.运算符与表达式/7.sizeof运算符/sizeof_op.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -23,7 +23,7 @@ int main()
## 选项
### A
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -41,7 +41,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -59,7 +59,7 @@ int main()
### C
```
```
c
#include <stdio.h>
int
main
()
...
...
data/1.C语言初阶/3.运算符与表达式/8.运算符优先级与求值顺序/precedence.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -20,7 +20,7 @@ int main()
### A
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -34,7 +34,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -47,7 +47,7 @@ int main()
```
### C
```
```
c
#include <stdio.h>
int
main
()
...
...
data/1.C语言初阶/4.语句与控制流/1.语句与程序块/statements_n_blocks.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -22,7 +22,7 @@ int main()
## 选项
### A
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -39,7 +39,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -58,7 +58,7 @@ int main()
### C
```
```
c
#include <stdio.h>
int
main
()
...
...
data/1.C语言初阶/4.语句与控制流/2.判断语句/elseif.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
#include <math.h>
...
...
@@ -39,7 +39,7 @@ int main()
### A
```
```
c
#include <stdio.h>
#include <math.h>
...
...
@@ -72,7 +72,7 @@ int main()
### B
```
```
c
#include <stdio.h>
#include <math.h>
...
...
@@ -105,7 +105,7 @@ int main()
### C
```
```
c
#include <stdio.h>
#include <math.h>
...
...
data/1.C语言初阶/4.语句与控制流/2.判断语句/if.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
/* 交换x和y */
...
...
@@ -39,7 +39,7 @@ int main()
### A
```
```
c
#include <stdio.h>
/* 交换x和y */
...
...
@@ -72,7 +72,7 @@ int main()
### B
```
```
c
#include <stdio.h>
/* 交换x和y */
...
...
@@ -105,7 +105,7 @@ int main()
### C
```
```
c
#include <stdio.h>
/* 交换x和y */
...
...
data/1.C语言初阶/4.语句与控制流/2.判断语句/ifelse.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -33,7 +33,7 @@ int main()
### A
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -60,7 +60,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -87,7 +87,7 @@ int main()
### C
```
```
c
#include <stdio.h>
int
main
()
...
...
data/1.C语言初阶/4.语句与控制流/2.判断语句/switch.md
浏览文件 @
3a25072d
...
...
@@ -12,7 +12,7 @@
## 答案
```
```
c
#include<stdio.h>
int
main
()
...
...
@@ -54,7 +54,7 @@ int main()
### A
```
```
c
#include<stdio.h>
int
main
()
...
...
@@ -94,7 +94,7 @@ int main()
### B
```
```
c
#include<stdio.h>
int
main
()
...
...
@@ -134,7 +134,7 @@ int main()
### C
```
```
c
#include<stdio.h>
int
main
()
...
...
data/1.C语言初阶/4.语句与控制流/3.循环语句/for.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -25,7 +25,7 @@ int main()
## 选项
### A
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -45,7 +45,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -65,7 +65,7 @@ int main()
### C
```
```
c
#include <stdio.h>
int
main
()
...
...
data/1.C语言初阶/4.语句与控制流/3.循环语句/goto.md
浏览文件 @
3a25072d
...
...
@@ -3,7 +3,7 @@
使用goto语句求10以内的正整数之和。请选出错误答案。
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -24,7 +24,7 @@ int main()
## 选项
### A
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -44,7 +44,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -64,7 +64,7 @@ int main()
### C
```
```
c
#include <stdio.h>
int
main
()
...
...
data/1.C语言初阶/4.语句与控制流/3.循环语句/while.md
浏览文件 @
3a25072d
...
...
@@ -6,7 +6,7 @@
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -40,7 +40,7 @@ int main()
### A
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -70,7 +70,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -102,7 +102,7 @@ int main()
### C
```
```
c
#include <stdio.h>
int
main
()
...
...
data/2.C语言中阶/1.函数与程序结构/2.函数的参数/parameter_n_argument.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
void
swap
(
int
*
x
,
int
*
y
)
...
...
@@ -42,7 +42,7 @@ int main() {
## 选项
### A
```
```
c
#include <stdio.h>
void
swap
(
int
*
x
,
int
*
y
)
...
...
@@ -79,7 +79,7 @@ int main() {
### B
```
```
c
#include <stdio.h>
void
swap
(
int
*
x
,
int
*
y
)
...
...
@@ -116,7 +116,7 @@ int main() {
### C
```
```
c
#include <stdio.h>
int
sum
(
int
,
int
,
int
);
...
...
data/2.C语言中阶/1.函数与程序结构/3.函数的返回/return.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
*
素数是自然数,小于零的整数没有意义。
## 答案
```
```
c
#include <stdio.h>
void
prime
(
int
n
)
...
...
@@ -49,7 +49,7 @@ int main()
## 选项
### A
```
```
c
#include <stdio.h>
void
prime
(
int
n
)
...
...
@@ -92,7 +92,7 @@ int main()
```
### B
```
```
c
#include <stdio.h>
int
prime
(
int
n
)
...
...
@@ -133,7 +133,7 @@ int main()
```
### C
```
```
c
#include <stdio.h>
void
prime
(
int
n
)
...
...
@@ -176,7 +176,7 @@ int main()
```
### D
```
```
c
#include <stdio.h>
int
prime
(
int
n
)
...
...
data/2.C语言中阶/1.函数与程序结构/5.函数的递归/recursion.md
浏览文件 @
3a25072d
...
...
@@ -3,7 +3,7 @@
使用函数递归的方法打印斐波那契数列的前n个数:0 1 1 2 3 5 8 13 21 34 ……, 找出正确的选项。
## 答案
```
```
c
#include <stdio.h>
int
fibonacci
(
int
i
)
...
...
@@ -33,7 +33,7 @@ int main()
## 选项
### A
```
```
c
#include <stdio.h>
int
fibonacci
(
int
i
)
...
...
@@ -62,7 +62,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
fibonacci
(
int
i
)
...
...
@@ -91,7 +91,7 @@ int main()
### C
```
```
c
#include <stdio.h>
int
fibonacci
(
int
i
)
...
...
data/2.C语言中阶/2.数组/1.数组简介/array_def.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
#define LEN 5
...
...
@@ -25,7 +25,7 @@ int main()
## 选项
### A
```
```
c
#include <stdio.h>
#define LEN 5
...
...
@@ -44,7 +44,7 @@ int main()
### B
```
```
c
#include <stdio.h>
#define LEN 5
...
...
@@ -63,7 +63,7 @@ int main()
### C
```
```
c
#include <stdio.h>
#define LEN 5
...
...
data/2.C语言中阶/2.数组/2.一维数组/bubble_sort.md
浏览文件 @
3a25072d
...
...
@@ -3,7 +3,7 @@
用冒泡排序法对任意输入的10个整数按照从小到大的顺序进行排序。请选出正确答案。
## 答案
```
```
c
#include <stdio.h>
#include <stdbool.h>
#define LEN 10
...
...
@@ -48,7 +48,7 @@ int main()
### A
```
```
c
#include <stdio.h>
#include <stdbool.h>
...
...
@@ -91,7 +91,7 @@ int main()
### B
```
```
c
#include <stdio.h>
#include <stdbool.h>
#define LEN 10
...
...
@@ -134,7 +134,7 @@ int main()
### C
```
```
c
#include <stdio.h>
#include <stdbool.h>
#define LEN 10
...
...
data/2.C语言中阶/2.数组/3.二维数组/matrix.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
#define LEN 101
...
...
@@ -49,7 +49,7 @@ int main()
## 选项
### A
```
```
c
#include <stdio.h>
#define LEN 101
...
...
@@ -93,7 +93,7 @@ int main()
### B
```
```
c
#include <stdio.h>
#define LEN 101
...
...
@@ -136,7 +136,7 @@ int main()
### C
```
```
c
#include <stdio.h>
#define LEN 101
...
...
data/2.C语言中阶/2.数组/4.变长数组/vla.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
#define ROWS 3
#define COLS 4
...
...
@@ -44,7 +44,7 @@ int main()
## 选项
### A
```
```
c
#include <stdio.h>
#define ROWS 3
#define COLS 4
...
...
@@ -81,7 +81,7 @@ int main()
### B
```
```
c
#include <stdio.h>
#define ROWS 3
#define COLS 4
...
...
@@ -120,7 +120,7 @@ int main()
### C
```
```
c
#include <stdio.h>
#define ROWS 3
#define COLS 4
...
...
data/2.C语言中阶/3.指针/1.指针与地址/pointers.md
浏览文件 @
3a25072d
...
...
@@ -3,7 +3,7 @@
使用指针交换两个变量的值。请选出正确答案。
## 答案
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -30,7 +30,7 @@ int main()
### A
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -53,7 +53,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
@@ -78,7 +78,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
main
()
...
...
data/2.C语言中阶/3.指针/2.指针与函数参数/pointers_n_func.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
void
swap
(
int
x
,
int
y
)
...
...
@@ -31,7 +31,7 @@ int main()
### A
```
```
c
#include <stdio.h>
void
swap
(
int
*
x
,
int
*
y
)
...
...
@@ -61,7 +61,7 @@ int main()
### B
```
```
c
#include <stdio.h>
void
swap
(
int
*
x
,
int
*
y
)
...
...
@@ -86,7 +86,7 @@ int main()
### C
```
```
c
#include <stdio.h>
void
swap
(
int
**
x
,
int
**
y
)
...
...
data/2.C语言中阶/3.指针/3.指针与数组/pointers_n_array.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
#define LEN 10
...
...
@@ -31,7 +31,7 @@ int main()
### A
```
```
c
#include <stdio.h>
#define LEN 10
...
...
@@ -57,7 +57,7 @@ int main()
### B
```
```
c
#include <stdio.h>
#define LEN 10
...
...
@@ -83,7 +83,7 @@ int main()
### B
```
```
c
#include <stdio.h>
#define LEN 10
...
...
data/2.C语言中阶/3.指针/4.地址算术运算/pointers_arithmetic_op.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
#define ROW 3
#define COL 4
...
...
@@ -33,7 +33,7 @@ int main()
### A
```
```
c
#include <stdio.h>
#define ROW 3
#define COL 4
...
...
@@ -59,7 +59,7 @@ int main()
### B
```
```
c
#include <stdio.h>
#define ROW 3
#define COL 4
...
...
@@ -85,7 +85,7 @@ int main()
### C
```
```
c
#include <stdio.h>
#define ROW 3
#define COL 4
...
...
data/2.C语言中阶/3.指针/7.指向函数的指针/pointers_2_func.md
浏览文件 @
3a25072d
...
...
@@ -4,7 +4,7 @@
## 答案
```
```
c
#include <stdio.h>
int
max
(
int
a
,
int
b
)
...
...
@@ -31,7 +31,7 @@ int main()
### A
```
```
c
#include <stdio.h>
int
max
(
int
a
,
int
b
)
...
...
@@ -56,7 +56,7 @@ int main()
### B
```
```
c
#include <stdio.h>
int
max
(
int
a
,
int
b
)
...
...
@@ -81,7 +81,7 @@ int main()
### C
```
```
c
#include <stdio.h>
int
max
(
int
a
,
int
b
)
...
...
data/3.C语言高阶/3.位运算/1.位和字节/check.json
0 → 100644
浏览文件 @
3a25072d
{
"type"
:
"code_options"
,
"author"
:
"刘鑫"
,
"source"
:
"check.md"
,
"exercise_id"
:
"7deb64fd1f71418d9951f05c99d3694c"
}
\ No newline at end of file
src/main.py
浏览文件 @
3a25072d
...
...
@@ -4,15 +4,61 @@ from common.logger import init_log
from
config.config
import
load_config
from
options
import
parse_options
,
show_help
from
tree
import
gen_tree
from
os
import
walk
import
os.path
def
test
(
config
,
options
,
actions
):
import
test
as
test
test
.
dispatch
(
config
,
options
,
actions
)
def
readall
(
path
):
with
open
(
path
)
as
f
:
return
f
.
read
()
def
write
(
path
,
data
):
with
open
(
path
,
"w"
)
as
f
:
f
.
write
(
data
)
def
makeup
():
for
dir
,
sub_dirs
,
files
in
walk
(
"../data"
):
for
fname
in
files
:
_
,
ext
=
os
.
path
.
splitext
(
fname
)
if
ext
==
".md"
:
full_path
=
os
.
path
.
join
(
dir
,
fname
)
content
=
readall
(
full_path
)
lines
=
content
.
split
(
"
\n
"
)
new_lines
=
[]
flag
=
False
in_block
=
False
for
line
in
lines
:
new_line
=
line
if
line
.
startswith
(
"```"
):
if
in_block
:
in_block
=
False
else
:
in_block
=
True
if
line
[
3
:]
!=
""
:
continue
else
:
new_line
=
line
+
'c'
flag
=
True
new_lines
.
append
(
new_line
)
if
flag
:
content
=
"
\n
"
.
join
(
new_lines
)
write
(
full_path
,
content
)
def
tree
(
config
,
options
,
actions
):
import
test
as
test
gen_tree
(
"../data"
)
def
run
(
options
):
# 操作入口
if
options
.
action
is
not
None
:
...
...
@@ -33,7 +79,8 @@ def run(options):
next
=
actions
[
1
:]
dispatch
=
{
'test'
:
lambda
:
test
(
config
,
options
,
next
),
'tree'
:
lambda
:
tree
(
config
,
options
,
next
)
'tree'
:
lambda
:
tree
(
config
,
options
,
next
),
'makeup'
:
lambda
:
makeup
()
}
dispatch
[
root_action
]()
else
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录