From d480dbfba516a2f46d82e64c709d76c892e0972a Mon Sep 17 00:00:00 2001
From: Mactavish <maczhanchao@yahoo.com>
Date: Sun, 23 Apr 2023 15:52:28 +0200
Subject: [PATCH] restructure the document

---
 clang.md | 66 ++++++++++++++++++++++++++++++--------------------------
 1 file changed, 36 insertions(+), 30 deletions(-)

diff --git a/clang.md b/clang.md
index 3ad1b58..d665279 100644
--- a/clang.md
+++ b/clang.md
@@ -4,36 +4,6 @@ This document is not intended to be a primer on the C programming language. It o
 
 We will focus on common errors, caveats and important concepts that might ease your cognitive overhead when you program in C. We will also recommend some tools that help you speed up your development and debugging.
 
-## C Compilation Process
-
-Unlike other interpreted programming languages, we use compilers to compile C written programs.
-
-A full compilation in C is depicted in the following figure:
-
-![](./images/c-compilation.png)
-
-A detailed explanation can be found [here](https://www.scaler.com/topics/c/compilation-process-in-c/).
-
-## C Macros
-
-You often see C preprocessor macros defined to create "small functions"
-
-But they **aren't actual functions**, it just changes the **text** of the program.
-
-`#include` just copies that file into the current file and replace the arguments.
-
-Example:
-
-```c
-#define twox(x) (x + x)
-
-// twox(3); => (3 + 3);
-
-// this could lead to unexpected behaviours
-// int y = 2;
-// int z = twox(y++); => z = (y++ + y++);  the value of z actaully depends on the order of evaluation
-```
-
 ## Specific Sized Numbers
 
 C only guarantees minimum and relative size of "int", "short" etc... The range that each type can represent depends on the implementation.
@@ -315,3 +285,39 @@ These are common in many codebases, and the first time you see them, you might b
 `x = *p++` is actually doing `x = *p; p = p + 1;`.
 
 `x = (*p)++` is actually doing `x = *p; *p = *p + 1;`.
+
+## Arrays
+
+## Strings
+
+## C Memory Management
+
+## C Compilation Process
+
+Unlike other interpreted programming languages, we use compilers to compile C written programs.
+
+A full compilation in C is depicted in the following figure:
+
+![](./images/c-compilation.png)
+
+A detailed explanation can be found [here](https://www.scaler.com/topics/c/compilation-process-in-c/).
+
+## C Macros
+
+You often see C preprocessor macros defined to create "small functions"
+
+But they **aren't actual functions**, it just changes the **text** of the program.
+
+`#include` just copies that file into the current file and replace the arguments.
+
+Example:
+
+```c
+#define twox(x) (x + x)
+
+// twox(3); => (3 + 3);
+
+// this could lead to unexpected behaviours
+// int y = 2;
+// int z = twox(y++); => z = (y++ + y++);  the value of z actaully depends on the order of evaluation
+```
-- 
GitLab