Skip to main content
4 of 15
edited body
Prasoon Saurav
  • 93.3k
  • 51
  • 245
  • 348

No, an array type is implicitly converted into pointer type when you pass it in to a function.

So,

void PrintSize(int p_someArray[10]){ printf("%d\n", sizeof(p_someArray)); } 

and

void PrintSize(int *p_someArray){ printf("%d\n", sizeof(p_someArray)); } 

are equivalent. So what you get is the value of sizeof(int *).

Prasoon Saurav
  • 93.3k
  • 51
  • 245
  • 348