What is the size of char pointer (IN BYTES)

Showing Answers 1 - 8 of 8 Answers

Pointer is a variable that points to a specific location of memory (i.e. RAM). Same is true for char pointers also, therefore size of char pointer is 4 bytes

  Was this answer useful?  Yes


  • Dec 18th, 2006

Yes. that is correct in a 32-bit system. (4 bytes for pointer data type). It doesn't matter which type of variable it is pointing to. All it needs to do it, hold the address.

  Was this answer useful?  Yes


  • Feb 1st, 2007

any pointer its size is always two bytes

  Was this answer useful?  Yes

Subhra Kanti Sahu

  • Feb 8th, 2007

Basically when ever we are using pointer that refers some other variables, when the pointers refer some variable means it contains it address and addresses are stored in integer format. If the compiler support 32-bit, then size of char * is 4 BYTES.

Subhra Kanti Sahu

  Was this answer useful?  Yes


  • Feb 19th, 2007

Actually a pointer is just a address holder so its size is always that of an int data type,what ever may be the type of pointer.In a 16-bit compiler,its 2 bytes and in 32-bit compiler,its 4 bytes(ie depeds on sizeof(int))

  Was this answer useful?  Yes

shivam shrivastava

  • Apr 22nd, 2013

In c++, if the pointer object characterized like a type of char ,int or float in array. So the pointer address contains the 2 bytes address.

  Was this answer useful?  Yes


  • Jun 21st, 2016

It is only possible when we declare char pointer (char *p) and print the ("%d",sizeof(p)) while not giving 4 bytes on ("%d",sizeof(*p)) why?

  Was this answer useful?  Yes


  • May 9th, 2017

In 32 bit system - 4 byte
In 64 bit System - 8 byte

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions