Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

For you

Name: Anonymous 2012-01-12 14:20

What is the output of this program and why?

#include <stdio.h>

void f(void) {
  printf("hax my anus\n");
  fflush(stdout);
  f();
}

int main(void) {
  f();
  return 0;
}

Name: Anonymous 2012-01-12 14:56

C99 6.5.2.2.11 Recursive function calls shall be permitted, both directly and indirectly through any chain of other functions.
Because C has no stack, it can theoretically run forever. In fact tail recursion optimizations are possible only because the C standard does not mention a stack.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List