In an expression, what does the name of an array decay into?
-
A
A pointer to its first element
Correct answer
-
B
A pointer to its last element
-
C
A copy of the entire array
-
D
The count of its elements
Correct answer
A. A pointer to its first element
13 views
Explanation
Except as the operand of sizeof or the address operator, an array name decays to a pointer to its first element.
Reference
Asked in: NTS, PPSC IT, Campus Interviews
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ