Three exceptions of array name

C/C++ in most contests treats the name of an array as if it were a pointer which point the the first element.

There are a three exceptions to this rule.

  1. The array declaration uses the array name to label the storage.
  2. Applying sizeof to an array name yields the size of the whole array, in bytes.
  3. Appaying the address operator & to an array name returns the address of the whole array.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章