Arrays Flashcards
What is an array?
An array is a built in data structure (not elementary tho), allowing storing of data of the same primitive data type under the same name. It is finite
is a primitive data type and elementary data type the same thing?
yes
What dimensions can arrays be?
Any dimensions but i have to know about them up to 3d
What is the difference between an array and a list?
Array cannot be appended while program is being executed, these are finite
myArray = [51,72,6,90,123,456]
What is the output if statement print(myArray[0]) is written?
51
myArray = [51,72,6,90,123,456]
What is the output if statement print(myArray[5]) is written?
456
myArray = [51,72,6,90,123,456]
What dimension is this array?
1 dimensional array
Arrays are what based?
0 based, the first element is the 0 element in terms of index
What essentially is a 2d array?
a table of rows and columns (area like)
What essentially is a 2d array?
a cube of rows, columns and a depth (volume like)
Is an array static or dynamic?
static data structure, it cannot change in size although data items can be added and removed