1.

What is the infex of the element O in the following array char ch[ ]={ a, e, i,o,u​

Answer»

Index of the ELEMENT 'o' is 3.Explanation: In an array containing n elements, the index always STARTS from 0 and ends with (n-1). For example a[0] represents the FIRST element of an array a[], a[19] represent the twentieth element of the array. In this case 'o' is the 4TH element of the array ch[] and HENCE its index is 3.



Discussion

No Comment Found

Related InterviewSolutions