Array & Structure

2
Array & Structure

description

Array & Structure. Array & Structure. - PowerPoint PPT Presentation

Transcript of Array & Structure

Page 1: Array  & Structure

Array & Structure

Page 2: Array  & Structure

Array & Structure

Array StructureCollection of homogeneous data

elements Collection of heterogeneous data elements

derived data type User derived data type

array can declared like a variable, ie data type with array name[size]

The struct keyword is used to declare a structure

Array can access directly by indicating the index value within []

Structure can access by declaring its variable and using '.' operator

All elements of the array are allocated equal amount of memory

Members of the structure are allocated memory depending upon their data type, so

memory allocated is flexible