1.

When the sizeof() function is invoked on an array. What information does it return?(a) Number of elements in the array(b) The largest element in the array(c) The total sum of the ASCII values of the elements in the array(d) The largest ASCII value of any element in the arrayThis question was posed to me during a job interview.My enquiry is from The sizeof() Function topic in portion Arduino Programming of Arduino

Answer»

The correct OPTION is (a) Number of ELEMENTS in the array

To elaborate: 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