From 093141a8e4ba7841a8b81420b6d97075fa773ea0 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Mon, 9 Mar 2015 21:22:18 +0100 Subject: [PATCH] up --- .../Makefile | 2 +- .../exercise2c.c | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 ass5a/mart/sws1-assignment5-s4109503-s4202015/exercise2c.c diff --git a/ass5a/mart/sws1-assignment5-s4109503-s4202015/Makefile b/ass5a/mart/sws1-assignment5-s4109503-s4202015/Makefile index 319b859..8faf6d0 100644 --- a/ass5a/mart/sws1-assignment5-s4109503-s4202015/Makefile +++ b/ass5a/mart/sws1-assignment5-s4109503-s4202015/Makefile @@ -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 index 0000000..3797073 --- /dev/null +++ b/ass5a/mart/sws1-assignment5-s4109503-s4202015/exercise2c.c @@ -0,0 +1,20 @@ +#include + +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; +} -- 2.20.1