HELP ! cant understand this.
Mar 25, 2016 at 10:49am
ARR[L]+=L
ARR[L]*=L
what does this mean ?
Last edited on Mar 25, 2016 at 10:50am
Mar 25, 2016 at 10:52am
Last edited on Mar 25, 2016 at 10:54am
Mar 25, 2016 at 1:28pm
Thats right,but what i want to know is how can we add or multiply a number (ie. index L here) to an array (here ARR[L]).what would it result in ?
Mar 25, 2016 at 2:16pm
how can we add or multiply a number (ie. index L here) to an array (here ARR[L]).what would it result in ? |
Here's an example.
Imagine that the array ARR is this array of int values.
{ 1 , 3 , 84, 7 }
Imagine L is 2.
So what is ARR[L]? It's ARR[2], which is 84.
So what is ARR[L] * L ? It's 84 * 2, which is 168.
You are NOT adding or multiplying a number "to an array". You are adding or multiplying to one of the number inside that array.
Topic archived. No new replies allowed.