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 1:56

>>34
Forget about the array, I think his question is whether int x[5] might in fact end up taking sizeof(int)*8 for example.

The way I see it, int x[5] being an array and not an struct, it's not allowed, ergo your right.

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