Output the size of a pointer : Pointer Size « Pointer « C Tutorial






#include <stdio.h>

int main(void)
{
  int number = 0;                 
  int *pointer = NULL;            

  number = 10;

  pointer = &number;            

  printf("\npointer's size: %d bytes", sizeof(pointer)); /* Output the size   */
  return 0;
}
pointer's size: 4 bytes








10.7.Pointer Size
10.7.1.Output the size of a pointer