1.

What function will we use to find out the number of elements in an array?(a) sizeof()(b) size()(c) sf()(d) sizeOf()This question was addressed to me during an online interview.My question is from The sizeof() Function topic in chapter Arduino Programming of Arduino

Answer»

Correct CHOICE is (a) sizeof()

Best explanation: The primary use of the sizeof() function is to RETURN the length or size of an element that is given to it. So, if this element is an array which is a collection of ELEMENTS, it will GIVE the NUMBER of elements present inside the array.



Discussion

No Comment Found

Related InterviewSolutions