You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
616 B

/**
* :author: Dan Buch (daniel.buch@gmail.com)
*/
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
char *buf;
long long huge = 8000000000000000000;
/* Okay, so this is *not* going to segfault because
* the way memory is allocated has changed since
* the tutorial was written. The segfault is supposed
* to happen when more memory is allocated than is
* available on the machine. So much for that exercise.
*/
buf = malloc(huge);
fgets(buf, 1024, stdin);
printf("%s\n", buf);
return 1;
}
/* vim:filetype=c:fileencoding=utf-8
*/