diff options
| author | Benedict <benedict@0xb8000.de> | 2016-03-03 21:49:01 +0100 |
|---|---|---|
| committer | Benedict <benedict@0xb8000.de> | 2017-02-21 13:00:24 +0100 |
| commit | bd7b98c2aac8fdfd128aff832c663d60d3374d63 (patch) | |
| tree | 45b71ac2935cbf9f64e6e892b912868990af7c75 /task5.c | |
| parent | 383732972f4c00dce231f61ac7375ae212e0d9c7 (diff) | |
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.
Diffstat (limited to 'task5.c')
| -rw-r--r-- | task5.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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); +} |
