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

suppose t refers to an array of int values with five elements and all of those elements have been given a value of 4. which statement would change the value of the last element to 3? t[3] = 5; t[5] = 3; t[4] = 3; t[4] = 5; I think it's "t[4] = 3;"

OpenStudy (anonymous):

@jim_thompson5910

OpenStudy (anonymous):

It is t[4] = 3;

OpenStudy (anonymous):

@EpicFailProductions you are correct.

OpenStudy (perl):

is this a programming question

OpenStudy (anonymous):

Yes it is programming.

OpenStudy (anonymous):

Yes. But there is no one in the computer science section. so the next closest thing is mathmatics

OpenStudy (perl):

if i had to guess i would say t[5] = 3

OpenStudy (perl):

since it is the 5th element in the array

OpenStudy (anonymous):

elements start at 0

OpenStudy (anonymous):

0 is an element

OpenStudy (anonymous):

so 4 would be the 5th element

OpenStudy (perl):

sorry i didnt know that, then yes t[4]= 3

OpenStudy (anonymous):

:D

OpenStudy (perl):

that makes sense, you are reassigning the 4th element, counting from zero

OpenStudy (anonymous):

could you give mrdoodle a point?

OpenStudy (anonymous):

nvm I got it

OpenStudy (anonymous):

MDoodler would you mind looking over a few other questions for me? I've answered all of them I'm just not 100% sure about them

OpenStudy (anonymous):

t[0] = 4; t[1] = 4; t[2] = 4; t[3] = 4; t[4] = 4; 5 elements. Array index uses whole numbers, which start with 0. To change the last element to 3. we change t[4] = 4; to t[4] = 3;

OpenStudy (anonymous):

that makes sense :) Would you mind looking over a few other questions for me?

OpenStudy (anonymous):

12.00 AM here I am getting ready to go to bed.

OpenStudy (anonymous):

awe :( okay...

OpenStudy (anonymous):

Post them in CS and someone will get to them.

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!