why can’t we use sizeof() here?
And how to find length then ?
why can’t we use sizeof() here?
And how to find length then ?
hello @prerak_semwal
the compiler will treat a[] as a pointer.
so sizeof(a)/size(int) will give pointer size/size of int
which is definitely not the array size.
u need to explicitly pass length of array in function argument
corrected -> which is definitely not the array size…