sizeof(char*)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arnaudk
    Contributor
    • Sep 2007
    • 425

    sizeof(char*)

    Why is sizeof(char*) = 4? I would have expected 1... Is it because a pointer is stored as an int ?
  • pootle
    New Member
    • Apr 2008
    • 68

    #2
    It is the size in bytes - pointers are 32 bits on 32 bit architectures.

    Comment

    • dtimes6
      New Member
      • Oct 2006
      • 73

      #3
      so what is you sizeof(int) ?

      Comment

      Working...