A
Alexei A. Frounze
....
And chances are that the tree will print the same number. And that's
practically on every system, if not on all.
However, sizeof(void*) and sizeof(void(*)()) are very often different,
consider the Harvard architecure (if you've always programmed in msvc++ on
x86 PC , where program and data memories aren't necessarily the same thing
and may have different width of either the address bus or data bus or both,
alsmo meaning that a byte in one space isn't necessarily equal to a byte in
the other (in bits).
Alex
The quickest way to find out what pointer sizes are on your particular
implementation:
printf("sizeof(char*): %lu\n", (unsigned long) sizeof(char*));
printf("sizeof(int*): %lu\n", (unsigned long) sizeof(int*));
printf("sizeof(short*): %lu\n", (unsigned long) sizeof(short*));
And chances are that the tree will print the same number. And that's
practically on every system, if not on all.
However, sizeof(void*) and sizeof(void(*)()) are very often different,
consider the Harvard architecure (if you've always programmed in msvc++ on
x86 PC , where program and data memories aren't necessarily the same thing
and may have different width of either the address bus or data bus or both,
alsmo meaning that a byte in one space isn't necessarily equal to a byte in
the other (in bits).
Alex