0
What are strings and arrays
ARRAYS ,STRINGS AND POINTERS
3 odpowiedzi
0
Strings are texts with two " or ' and can be used to be displayed
Arrays are sometimes sorted sometimes unsorted collections of data like
Fruit = ["Apple", "Banana", "Kiwi"]
Above you have also a mix of an array and a string. In the array are strings like "Apple"
0
Pointers is a position of an element of an array or object
Like in the example above
Fruit = ["Apple", "Banana", "Kiwi"]
And if the pointer is set to 2 then the result will be "Kiwi" because you start to count in arrays from 0
0
Other pointers like 0 give as result "Apple"