first exercise and extra credit work in Markdown note with screenshots, possibly for publishing later
This commit is contained in:
parent
e4a615aea1
commit
a107e72b2a
4
Makefile
Normal file
4
Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
CFLAGS=-Wall -g
|
||||
|
||||
clean:
|
||||
rm -f ex1
|
BIN
assets/imgs/ex1-extra-credit_2024-08-29_09-23-12.png
Normal file
BIN
assets/imgs/ex1-extra-credit_2024-08-29_09-23-12.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 149 KiB |
BIN
ex1
Normal file
BIN
ex1
Normal file
Binary file not shown.
12
ex1-extra-credit.md
Normal file
12
ex1-extra-credit.md
Normal file
@ -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:
|
||||

|
||||
|
||||
change: `char word[] = "HELL";` - removed `char`
|
||||
|
||||
result:
|
||||
|
||||
|
||||
|
14
ex1.c
Normal file
14
ex1.c
Normal file
@ -0,0 +1,14 @@
|
||||
#include <stdio.h>
|
||||
|
||||
/* 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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user