Is the sizeof(some pointer) always equal to four?

前端 未结 17 1203
温柔的废话
温柔的废话 2020-11-22 11:49

For example: sizeof(char*) returns 4. As does int*, long long*, everything that I\'ve tried. Are there any exceptions to this?

17条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 12:35

    No, the size of a pointer may vary depending on the architecture. There are numerous exceptions.

提交回复
热议问题