Lecture 007

Array

Array Basics

Array Endianness: Endianness is only applicable to single variables, ie. only to each array element value, not to the order of elements in the array.

Array

Array

Array Access Example

Array Access Example

Nested Arrays

Multi-dimentional

Array-of-Array

Three Ways To Access Array

Three Ways

Three Ways

Array Access Practice:

Array Access Practice

Array Access Practice

Array Access

array access

array access

difficult array access

difficult array access

array access 1

array access 1

array access 2

array access 2

Struct

Memory Location

Memory in Struct

Memory in Struct

Memory Alignment

Motivation

Example 1

Example 1

Example 2

Example 2

Example 3

Example 3

Note: to save space, order elements in struct by increasing or decreasing order

Floating Points

TODO: don't want to write this part

Table of Content