mirror of
https://github.com/TrudeEH/web.git
synced 2025-12-06 16:33:37 +00:00
Add an index to the notes section
This commit is contained in:
@@ -7,7 +7,6 @@ tags:
|
||||
- programming
|
||||
author: TrudeEH
|
||||
showToc: true
|
||||
weight: "32"
|
||||
---
|
||||
|
||||
## Time Complexity
|
||||
|
||||
@@ -8,7 +8,6 @@ tags:
|
||||
- programming
|
||||
author: TrudeEH
|
||||
showToc: true
|
||||
weight: "30"
|
||||
---
|
||||
|
||||
## Tools
|
||||
|
||||
@@ -7,19 +7,18 @@ tags:
|
||||
- programming
|
||||
author: TrudeEH
|
||||
showToc: true
|
||||
weight: "31"
|
||||
---
|
||||
|
||||
|
||||
Convert `C` code into machine code in 4 steps:
|
||||
1. **Preprocessing** (Convert all preprocessor instructions: `#…`)
|
||||
2. **Compiling** (Convert `C` code to machine code)
|
||||
3. **Assembling** (Compile the necessary libraries)
|
||||
4. **Linking** (Merge the compiled code with the compiled libraries)
|
||||
A compiler converts `C` code into machine code in 4 steps:
|
||||
1. **Preprocessing** (Convert all preprocessor instructions (`#…`) to C code.)
|
||||
2. **Compiling** (Convert `C` code to assembly.)
|
||||
3. **Assembling** (Compile the necessary libraries.)
|
||||
4. **Linking** (Merge the compiled code with the compiled libraries.)
|
||||
|
||||
## Libraries
|
||||
|
||||
Libraries are pre-written collections of code that can be reused in other programs. On **UNIX* systems, they are usually located in the `/lib/` and `/usr/include` directories.
|
||||
Libraries are pre-written collections of code that can be reused in other programs. On *UNIX* systems, they are usually located in the `/lib/` and `/usr/include` directories.
|
||||
|
||||
### Math.h
|
||||
|
||||
@@ -47,7 +46,7 @@ To use a library, we first have to include it in the `C` code.
|
||||
#include <cs50.h> // cs50.h library will be included.
|
||||
```
|
||||
|
||||
Then, the library must be linked at compile time.
|
||||
Then, the library must be linked at compile time (unless it is part of the C standard).
|
||||
|
||||
```Shell
|
||||
gcc -o hello hello.c -lcs50
|
||||
@@ -75,6 +74,6 @@ clean:
|
||||
```
|
||||
|
||||
```Shell
|
||||
make #Compiles hello.c
|
||||
make clean #Removes the executable (hello) generated by the make command.
|
||||
make # Compiles hello.c
|
||||
make clean # Removes the executable (hello) generated by the make command.
|
||||
```
|
||||
|
||||
@@ -8,7 +8,6 @@ tags:
|
||||
- computer-science
|
||||
author: TrudeEH
|
||||
showToc: true
|
||||
weight: "10"
|
||||
cover:
|
||||
image: LEG.png
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user