#include <stdlib.h>
#include <stdio.h>
#include <string.h>

int a;

int funnyAllocation (char *buf, int b) {
  a = 5;
  b = b + 1;
  strcpy (buf, "hello");
  return 7;
}

int main(int argc, char *argv[]) {
  int b = 3;
  char *buf;

  buf = calloc(20, sizeof (*buf));

  int returned = funnyAllocation(buf, b);

  printf("The returned value is: %d\n", returned);
  printf("The value of b is: %d\n", b);
  printf("The content of buf is: %s\n", buf);

  free(buf);
  return 0;
}
