Ask your own question, for FREE!
Mathematics 16 Online
OpenStudy (anonymous):

If an array has two elements what is the index of the last element in the array? 0 1 2 3 How do I find this for future reference?

OpenStudy (unklerhaukus):

Does indexing start with 0 or 1?

OpenStudy (anonymous):

uhmm...

OpenStudy (anonymous):

0?

OpenStudy (unklerhaukus):

if the first element is indexed 0, then the next element will be indexed with ...

OpenStudy (anonymous):

1?

OpenStudy (unklerhaukus):

So if the array has only two elements, what is the index of the last element in the array?

OpenStudy (anonymous):

2?

OpenStudy (unklerhaukus):

how did you get that?

OpenStudy (anonymous):

well if 0 is the first indexed element and 1 is the second. then 2 must be the 3rd right?

OpenStudy (unklerhaukus):

there are only two elements in the array

OpenStudy (anonymous):

oh okay so 1?

OpenStudy (unklerhaukus):

yes \[A =\begin{pmatrix}a_0\\a_1 \end{pmatrix}\]

OpenStudy (anonymous):

:) thank you. Would you mind helping me with a few more?

OpenStudy (unklerhaukus):

ok

OpenStudy (unklerhaukus):

NB: some programming languages / syntax : index starting with 0, whereas others start indexing with 1

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!