From bd7b98c2aac8fdfd128aff832c663d60d3374d63 Mon Sep 17 00:00:00 2001 From: Benedict Date: Thu, 3 Mar 2016 21:49:01 +0100 Subject: reorgantzied code into libaray file For every task you may create a new file and implenet the task there by using functions from the lib.c file. Added Makefile for the different tasks. --- task5.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 task5.c (limited to 'task5.c') diff --git a/task5.c b/task5.c new file mode 100644 index 0000000..c2c72d0 --- /dev/null +++ b/task5.c @@ -0,0 +1,15 @@ +#include "lib.h" + +/* + * implements task 5 of set 1 of matanso challange + */ +void main() +{ + char *stanze = "Burning 'em, if you ain't quick and nimble\nI go crazy when I hear a cymbal"; + + char *result = malloc(strlen(stanze)); + char *printable = malloc(strlen(stanze)*5); + xor_string(stanze, "ICE", result); + hex_binary_to_string(result, printable, 2*strlen(stanze)); + printf("%s\n", printable); +} -- cgit v1.2.3-70-g09d2