answersLogoWhite

0


Best Answer

The size of a pointer is not dependent on the size of the target integer, float, and so on. Typically, a pointer is 2 bytes (16 bit system), 4 bytes (32 bit system), or 8 bytes (64 bit system).

Note: that's what sizeof is good for

As examples: (for a 32 bit Windows platform)

int a; /* sizeof(a) is 4 */

int* pa; /* sizeof(pa) is 4, and sizeof(*pa) is also 4 */

double d; /* sizeof(d) is 8 */

double* pd; /* sizeof(pd) is still 4, and sizeof(*pd) is 8 */

typedef struct s { /* using alignment option /zp1 */

int a;

double b;

char c[16];

} ss;

ss myss; /* sizeof(myss) is 28 */

ss* pmyss; /* sizeof(pmyss) is still 4, and sizeof(*pmyss) is 28 */

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How much space is occupied by an integer pointer float pointer..... n soo on?
Write your answer...
Submit
Still have questions?
magnify glass
imp