brk.c 389 B

1234567891011121314
  1. /* -*- mode:c; c-file-style:"k&r"; c-basic-offset: 4; tab-width:4; indent-tabs-mode:nil; mode:auto-fill; fill-column:78; -*- */
  2. /* vim: set ts=4 sw=4 et tw=78 fo=cqt wm=0: */
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <unistd.h>
  6. int main(int argc, char ** argv)
  7. {
  8. char * mem = malloc(40);
  9. sprintf(mem, "Hello world (%s)!\n", argv[0]);
  10. printf("%s", mem);
  11. return 0;
  12. }