how sizeof() works in pass by reference arguments

后端 未结 6 1778
深忆病人
深忆病人 2021-01-22 04:56

I passed a array to function and tried to find the length of the array . but the result was not expected . can anybody explain please?

int main()
{
     int arra         


        
6条回答
  •  野性不改
    2021-01-22 05:46

    sizeof(arr)
    

    is the size of a pointer, not the size of the block arr points to.

提交回复
热议问题