Array length problem

后端 未结 6 1505
栀梦
栀梦 2021-01-21 07:46

I was reading a csc placement paper where I read a question related to c language array\'s sizeof() operator. Answer was something else then i expected it to be.



        
6条回答
  •  时光取名叫无心
    2021-01-21 08:41

    The array is passed as a pointer. There is no way for the function to know how much space was allocated to the array.

提交回复
热议问题