1.

What is the starting index of an array in MATLAB?(a) 1(b) 0(c) Depends on the class of array(d) UnknownThis question was posed to me in an interview for internship.The origin of the question is Data Classes in division Beyond the Basics of MATLAB

Answer»

Right choice is (a) 1

To ELABORATE: Unlike C, the starting address of an array in MATLAB is 1. Hence if we declare an array named arr and TYPE arr(0), we will get an ERROR. The FIRST entry to the array will have the index 1.



Discussion

No Comment Found

Related InterviewSolutions