changeset 218 | bc1f7c82e1a8 |
parent 217 | 8ddf4fe6bf31 |
child 220 | 74772c30e0f4 |
--- a/progs/C1.c Tue Oct 07 00:12:29 2014 +0100 +++ b/progs/C1.c Tue Oct 07 00:15:41 2014 +0100 @@ -1,17 +1,20 @@ #include <string.h> #include <stdio.h> +#include <stdlib.h> void dead () { printf("I will never be printed!\n"); exit(1); } +void foo(char *bar) { + char buffer[8]; + strcpy(buffer, bar); +} int main(int argc, char **argv) { - char buffer[8]; - dead(); - strcpy(buffer, argv[1]); + foo(argv[1]); return 1; }