Back to questions
JuniorTheoryCommon
What does the program print (lines separated by spaces)?
Цены = Новый Массив;
Цены.Добавить(15);
Цены.Добавить(40);
Цены.Добавить(25);
Сообщить(Цены.Количество());
Сообщить(Цены[1]);
Сообщить(Цены.ВГраница());3 40 2
- Expecting array indexes to start at 1: the first element is
Цены[0], soЦены[1]is the second - Mixing up
Количество()andВГраница(): the first is the number of elements, the second the last index, one less
- What happens when the program reads
Цены[3]? - What does
ВГраница()return for an empty array?