Multiple choice technology

Array passed as an argument to a function is interpreted as

  1. Address of the array

  2. Values of the first elements of the array

  3. Address of the first element of the array

  4. Number of element of the array

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

When an array is passed to a function, it decays to a pointer to its first element. This is why array parameters are often declared as pointers, and why sizeof() returns the pointer size not the array size inside functions. Option C correctly states this: arrays are passed as the address of their first element.