diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..931a728 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +CFLAGS=-Wall -g + +clean: + rm -f ex1 diff --git a/assets/imgs/ex1-extra-credit_2024-08-29_09-23-12.png b/assets/imgs/ex1-extra-credit_2024-08-29_09-23-12.png new file mode 100644 index 0000000..30126d0 Binary files /dev/null and b/assets/imgs/ex1-extra-credit_2024-08-29_09-23-12.png differ diff --git a/ex1 b/ex1 new file mode 100644 index 0000000..7710c3c Binary files /dev/null and b/ex1 differ diff --git a/ex1-extra-credit.md b/ex1-extra-credit.md new file mode 100644 index 0000000..1e85a1e --- /dev/null +++ b/ex1-extra-credit.md @@ -0,0 +1,12 @@ + - Open the ex1 file in your text editor and change or delete random parts. Try running it and see what happens. + +change: `printf("What the %s is happening!");` - removed `word` +result: +![removed word](assets/imgs/ex1-extra-credit_2024-08-29_09-23-12.png) + +change: `char word[] = "HELL";` - removed `char` + +result: + + + diff --git a/ex1.c b/ex1.c new file mode 100644 index 0000000..c3b632f --- /dev/null +++ b/ex1.c @@ -0,0 +1,14 @@ +#include + +/* This is a comment. */ +int main(int argc, char *argv[]) +{ + int distance = 100; + char word[] = "HELL"; + + // this is also a comment + printf("You are %d miles away.\n", distance); + printf("What the %s is happening!", word); + + return 0; +}