In this project, I learned about compilation using gcc
, entry
points using main
, and text-printing functions in C.
-
0. Preprocessor
- 0-preprocessor: Bash script that runs a C file saved in the
variable
$CFILE
through the preprocessor and saves the result in the filec
.
- 0-preprocessor: Bash script that runs a C file saved in the
variable
-
1. Compiler
- 1-compiler: Bash script that compiles a C file saved in the
variable
$CFILE
that does not link; saves the result in an output file of the same name but with a.o
extension.- Example: If the C file is
main.c
, the output ismain.o
.
- Example: If the C file is
- 1-compiler: Bash script that compiles a C file saved in the
variable
-
2. Assembler
- 2-assembler: Bash script that generates the assembly code of a
C code saved in the variable
$CFILE
; saves the result in an output file of the same name but with a.s
extension.- Example: If the C file is
main.c
, the result ismain.s
.
- Example: If the C file is
- 2-assembler: Bash script that generates the assembly code of a
C code saved in the variable
-
3. Name
- 3-name: Bash Script that compiles a C file saved in the variable
$CFILE
and creates an executablecisfun
.
- 3-name: Bash Script that compiles a C file saved in the variable
-
4. Hello, puts
- 4-puts.c: C program that prints exactly
"Programming is like building a multilingual puzzle
, followed by a new line, using the functionputs
.
- 4-puts.c: C program that prints exactly
-
5. Hello, printf
- 5-printf.c: C program that prints exactly
with proper grammer, but the outcome is a piece of art,
, followed by a new line, using the functionprintf
.
- 5-printf.c: C program that prints exactly
-
6. Size is not grandeur, and territory does not make a nation
- 6-size.c: C program that prints the size of various types on the computer it is compiled and run on.
-
7. Intel
- 100-intel: Script that generates the assembly code in Intel syntax of a
C file saved in the variable $CFILE; saves the result in an output file of the same name
but with a
.s
extension.- Example: If the C file is
main.c
, the output ismain.s
.
- Example: If the C file is
- 100-intel: Script that generates the assembly code in Intel syntax of a
C file saved in the variable $CFILE; saves the result in an output file of the same name
but with a
-
8. UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity
- 101-quote.c: C program that prints exactly
and that piece of art is useful" - Dora Korpar, 2015-10-19
, followed by a new line, to the standard error, without using any functions listed in the NAME sesction of the man(3)printf
or man(3)puts
.
- 101-quote.c: C program that prints exactly