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

What does this program print?

Name: Anonymous 2011-10-18 14:55


#include <stdio.h>
int main() {
  int x[5];
  printf("%p\n", x);
  printf("%p\n", x+1);
  printf("%p\n", &x);
  printf("%p\n", &x+1);
  return 0;
}


Since none of you use C compilers I know there will be no risk of cheating.

Name: Anonymous 2011-10-20 0:02

>>27
Are you saying that the stack can't be aligned arbitrarily by the compiler? Surely the standard doesn't demand that all the locals be packed together like that, that would be silly.

Name: 29 2011-10-20 0:04

I mean the individual values on the stack, not the entire stack as a whole.

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