1 2 3 4 5 6 7 8 9 10 11 12 13
void verify_heap() { char *buf = malloc(8*sizeof(char)); int *verified = malloc(sizeof(int)); *verified = 0; gets(buf); /* <verification goes here> */ if (*verified) { printf("accept\n"); } else { printf("reject\n"); } }