up
authorMart Lubbers <mart@martlubbers.net>
Mon, 9 Mar 2015 20:22:18 +0000 (21:22 +0100)
committerMart Lubbers <mart@martlubbers.net>
Mon, 9 Mar 2015 20:22:18 +0000 (21:22 +0100)
ass5a/mart/sws1-assignment5-s4109503-s4202015/Makefile
ass5a/mart/sws1-assignment5-s4109503-s4202015/exercise2c.c [new file with mode: 0644]

index 319b859..8faf6d0 100644 (file)
@@ -1,5 +1,5 @@
 CFLAGS:=-g -std=c99 -Wextra -fno-omit-frame-pointer -fno-stack-protector
-PROGRAMS:=exercise2a
+PROGRAMS:=exercise2a exercise2c
 
 all: $(PROGRAMS)
 
diff --git a/ass5a/mart/sws1-assignment5-s4109503-s4202015/exercise2c.c b/ass5a/mart/sws1-assignment5-s4109503-s4202015/exercise2c.c
new file mode 100644 (file)
index 0000000..3797073
--- /dev/null
@@ -0,0 +1,20 @@
+#include <stdio.h>
+
+void function_b(void)
+{
+       char buffer[4];
+       fprintf(stdout, "Executing function_b\n");
+}      
+void function_a(void)
+{
+       int beacon = 0xa0b1c2d3;
+       fprintf(stdout, "Executing function_a\n");
+       function_b();
+       fprintf(stdout, "Executed function_b\n");
+}
+
+int main(void) {
+       function_a();
+       fprintf(stdout, "Finished!\n");
+       return 0;
+}