Whenever you make a variable of arry type by default index starts from 0 but what is do that index starts from 1 ex by deafault a[3] having index 0 1 2 but accourding to my ques a[3] index will be 1 2 3
11/27/2019 3:15:51 AM
Siddhant Jain2 Answers
New AnswerJust start from 1 Make array[0] be a null or irrelvant. And yes, make the array 1 size more than you want Problems: -You will have unused waste of space -More of a hassle Lua scripting language uses arrays starting from 1
All arrays are 0 indexed so what you are trying is not possible but you can always access the element at any index given that the index is between 0 to arraySize - 1.
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message