The name of an array itself, where is it stored

前端 未结 4 1725
醉话见心
醉话见心 2021-01-20 16:37

How are the names of arrays stored in memory?

For example if I write:

char arr[10];

the array items are stored in memory starting f

4条回答
  •  青春惊慌失措
    2021-01-20 17:19

    The name of the array is lost when you compile it. It is only for reference. The elements are stored in stack but the array name is lost after compilation unless and until you dont have -g option in your debugging.

提交回复
热议问题