I wonder about pointer concept in Burble Sort

I am making a Burble Sort project that sort numbers bigger to smaller.

I wonder why lengths of array in main ftn. and DesSort ftn. are different!!화면 캡처 2021-02-11 172336

It seems that my understanding of ‘pointer ftn.’ has a problem.

upper red line =1, lower red line=7

An “int*” has no concept of size. Calling sizeof on a pointer is always 1.

You need to pass the length of the array into your DesSort function.

It’ll be 4 or 8 on most platforms. Technically: The size of a pointer on that platform. But yes, the pointer size has nothing to do with the size of the thing it points at.