Sei sulla pagina 1di 33

Arrays vs Structures

1
Structures may contain elements of different types.
Arrays may only contain elements of similar types.

2
Structure objects behave as a new data type. Arrays
contain values of recognised data types.

3
Accessing to array elements are done using integer
index, while for structure attributes are done using
Arrays vs Structures

4
Array member operator [ ], structure member operator .

5
Passing arrays into function is done by address, while
passing structures into function is done by value.

...

Potrebbero piacerti anche