Machine-translated by Google. Questions are authored in English.
Top

Discussion

Array sizes are optional during array declaration by using ______ keyword.

  • A.auto
  • B.static
  • C.extern
  • D.register

Answer: C

Correct answer: extern

An extern declaration says the array is defined elsewhere, so its size may be omitted: extern int a[];. The definition in the other file supplies the size. Note the consequence - sizeof cannot be applied to it in this file, since the compiler does not know how big it is.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.