progs/C1.c
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Thu, 15 Dec 2016 16:11:05 +0000
changeset 502 66d2bc189b88
parent 220 74772c30e0f4
permissions -rw-r--r--
merged

#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) {
  foo(argv[1]);
  return 1;
}