From: Mart Lubbers Date: Mon, 9 Mar 2015 20:22:18 +0000 (+0100) Subject: up X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=093141a8e4ba7841a8b81420b6d97075fa773ea0;p=sws1-1415.git up --- 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; +}