feat(src/kr/ch1/s1.1/p6):Add hello world example
authorSteven Baltakatei Sandoval <baltakatei@gmail.com>
Fri, 14 Jul 2023 02:58:38 +0000 (02:58 +0000)
committerSteven Baltakatei Sandoval <baltakatei@gmail.com>
Fri, 14 Jul 2023 02:58:38 +0000 (02:58 +0000)
src/kr_exercises/ch1/s1.1/p6_hello_world/.gitignore [new file with mode: 0644]
src/kr_exercises/ch1/s1.1/p6_hello_world/Makefile [new file with mode: 0644]
src/kr_exercises/ch1/s1.1/p6_hello_world/hello.c [new file with mode: 0644]

diff --git a/src/kr_exercises/ch1/s1.1/p6_hello_world/.gitignore b/src/kr_exercises/ch1/s1.1/p6_hello_world/.gitignore
new file mode 100644 (file)
index 0000000..ce01362
--- /dev/null
@@ -0,0 +1 @@
+hello
diff --git a/src/kr_exercises/ch1/s1.1/p6_hello_world/Makefile b/src/kr_exercises/ch1/s1.1/p6_hello_world/Makefile
new file mode 100644 (file)
index 0000000..2a06090
--- /dev/null
@@ -0,0 +1,10 @@
+CC=gcc
+CFLAGS=-Wall -Wextra -pedantic
+OUTFILE=hello
+SOURCE=hello.c
+
+all: $(SOURCE)
+       $(CC) $(CFLAGS) -o $(OUTFILE) $(SOURCE)
+
+clean:
+       rm -f $(OUTFILE)
diff --git a/src/kr_exercises/ch1/s1.1/p6_hello_world/hello.c b/src/kr_exercises/ch1/s1.1/p6_hello_world/hello.c
new file mode 100644 (file)
index 0000000..a4cee5f
--- /dev/null
@@ -0,0 +1,5 @@
+#include <stdio.h>
+
+main() {
+  printf("hello, world\n");
+}