Blogs From The Members of PACEDev Forums
Random featured blog entry from Chris
|
|
C: sizeof(array-1)Posted 5th December 2007 at 11:44 AM by Chris
Wonder what happens when you try to take sizeof on a fixed length array with an offset? Me too!
Quote:
int foo[12];
printf("sizeof(foo): %d\n", sizeof(foo)); printf("sizeof(foo-1): %d\n", sizeof(foo-1)); Quote:
sizeof(foo): 48
sizeof(foo-1): 4 When we try: Quote:
printf("&foo: %p\n", &foo);
printf("&(foo-1): %p\n", &(foo-1)); |
|
Recent Entries
|
Recent Comments |
|
There are no recent entries to display.
|
There are no recent comments to display.
|
| Find more... |


