From 71646c46ab94e65768fb8297249000f2a26ea7e5 Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Thu, 15 Nov 2018 11:14:39 +0100 Subject: [PATCH] a3: Anzahl Zeichen korrigiert --- src/c/a3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c/a3.c b/src/c/a3.c index c575ef4..9ec395a 100644 --- a/src/c/a3.c +++ b/src/c/a3.c @@ -62,7 +62,7 @@ int main(int argc, char **argv) { memdump((unsigned char *) argv[0]); - printf("\tLaenge der Zeichenkette (inkl \\0): %i Byte(s)\n", (int) strlen(argv[1])); + printf("\tLaenge der Zeichenkette (inkl \\0): %i Byte(s)\n", (int) strlen(argv[1]) +1); printf("\tErsetzen: '%c' mit '%c'\n", *argv[2], *argv[3]); unsigned char *copy = malloc(4 * 16 * sizeof(char));//allocate memory for all chars