mayabrunsonjb3820 mayabrunsonjb3820
  • 02-09-2019
  • Computers and Technology
contestada

Given the statement: int list[25]; The index can go from 0 to 25 inclusive withoutgoing beyond the end of the array.true or false?

Respuesta :

SerenaBochenek SerenaBochenek
  • 05-09-2019

Answer:

False.

Explanation:

When we create an array of size n, then it's index will starts from 0 to n-1. Array index starts with 0 because the first element of the array holds the memory location that refers to 0 element away.Similarly 2nd element of array is 1 distance away from that location. That is why index starts with 0 and goes to n-1 if the size  is n.

In the question question, int list[25] is given. So the index will be from 0

to 25-1 only.If index will goes to 25 then it will go beyond the array.

Answer Link

Otras preguntas

What view did the new Republican Party and free soil party share
A sample contains 3.0 moles of barium chloride. How many chlorine atoms do you have?
Tell the measure of the angle in degrees 1/12
Which of the following inverse functions are defined for x=-1/2? Select all that apply. (select 4) A. [tex]y=cos^{-1} x[/tex] B. [tex]y=cot^{-1} x[/tex] C. [tex
Bilazora was the ancient seat of:
For a track meet, Tara ran the 1,600 m event at constant speed in 5 minutes and 20 seconds. What was her speed? THIS IS 60 POINTS.
How did the dual monarchy of Austria-Hungary function? A) Austria controlled departments of foreign affairs and defenses. B) each country was responsible for ma
I’m stuck on this please someone help
Please help with this
Ken collected 28 bugs over 4 weeks. After 5 weeks, how many bugs will he have caught