• • • • • • Introduction to Contiguous Data Type One dimensional array Multi dimensional array Array as String Multi dimensional character arrays Operation on String


This means that the value cannot be further subdivided or separated into a legitimate data type. retrieving and updating on individual data.Introduction • Scalar Variable – A scalar variable is a single variable whose stored value is an atomic type.g. • Why array is required? • An array can be defined as a data structure consisting of an ordered set of data values of the homogeneous type – An array is a collection of individual data element that are • Ordered • Fixed in size • Homogeneous 2 . • Derived Data Type – An operation must be available for adding. Array is Derived Data Type. deleting. is called derived data type. – E.

Multiplication. Sorting • Two-Dimensional Array – Operation On Two-Dimensional Array » Addition. • Multi-Dimensional Array 3 . – In C. Insertion. and the index begin at zero and is always written inside square brackets. Search.Array • Array – An array is a collection of data which shares a common identifier and data type. Deletion. Individual array element are identified by an integer index. Transpose etc. – Operation • Store and Retrieve – Defining Array • data_type array_identifier[size]. each array has two fundamental properties: the data type and the size. » m[0] m[1] m[2] m[3] m[4] m[5] m[6] m[7] – Types of Array • One-Dimensional Array – Operation On One-Dimensional Array » Traversal. • Example – double m[8].

'u'}. char vowels[5] = {'a'. 64. • Initializing Arrays – – – – int n[5] = {32. 27. int crt[] = {6. 18. 7. 'i'. – Data Type. 'o'. 'e'. – char buffer[buf_size]. vowels 'a' word 'H' 'e' 'i' 'o' 'u' 'e' 'l' 'l' 'o' '\0' 4 . 95}. Size and Name • Array Declaration – Example • float X[8]. • const int buf_size = 256.One – Dimensional Array • Three things need to be specified. char word[] = "Hello". 8}.

Sign up to vote on this title
UsefulNot useful