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

Discussion

Size of the array need not be specified, when

  • A.Initialization is a part of definition
  • B.It is a declaration
  • C.It is a formal parameter
  • D.All of these

Answer: A

Correct answer: All of these

The size may be omitted in all three cases: in a definition with an initialiser, where the compiler counts the initialisers; in a declaration such as extern int a[];, where the definition elsewhere supplies it; and in a formal parameter, where the array is adjusted to a pointer and any bound is ignored.

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

Post your comment

Please log in or register to post a comment.