How to analyze the C++ array name and sizeof
This article will explain in detail how to analyze C++ array names and sizeof. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.
The purpose of the one-dimensional array name:
You can count the length of the entire array in memory.
You can get the first address of the array in memory
Example:
Int main () {/ / Array name purpose / / 1, you can get the memory space occupied by the entire array int arr [10] = {1, 2, 5, 4, 5, 6, 7, 8, 9, 10]; cout