✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
If you do not know the size of the array needed, you can create an array large enough to hold any number of entries and tell users to enter a predetermined sentinel value after they enter the last value. Using this approach: