T
Taylor Romey
Guest
Hello all,
I have some questions about arrays and memory usage. I have a background in C and am wondering the following:
I have some questions about arrays and memory usage. I have a background in C and am wondering the following:
- Is it possible to initialize an array of a set size and not assign any values to any positions and therefore have them as null values? ie. myarray[size]; where size is an integer. In C it would be like "int myarray[20];"
- If I assign a value to say index "myarray[20] = x;", would all the other slots before index 20 remain unassigned?
- Given that, would assigning a value only to index 20 only open memory space for the size of one value, or would it open 20?