What does sizeof(&array) return?

前端 未结 3 1851
予麋鹿
予麋鹿 2020-11-22 01:42

Following the question: How come an array's address is equal to its value in C?

#include 
#define N 10    
char str2[N]={\"Hello\"};
int m         


        
3条回答
  •  既然无缘
    2020-11-22 02:24

    &str2 is a pointer. So you're just seeing the sizeof a pointer on your platform.

提交回复
热议问题