[C++ Learning Road] The meaning of sizeof(array)/sizeof(int)

array is an array
sizeof (array) is the total amount of memory (bytes) occupied by this array,
sizeof(int) is the memory occupied by a single.

So, sizeof (array) / sizeof (int) is the number of elements in the array array.


Guess you like

Origin blog.csdn.net/hackdjh/article/details/52104534