Wednesday, November 2, 2011

Summary of Arrays in C programming language

(a)  An array is similar to an ordinary variable except that it can store multiple elements of similar type.
(b)  Compiler doesn’t perform bounds checking on an array.
(c)  The array variable acts as a pointer to the zeroth element of the array. In a 1-D array, zeroth element is a single value, whereas, in a 2-D array this element is a 1-D array. 
(d)  On incrementing a pointer it points to the next location of its type. 
(e)  Array elements are stored in contiguous memory locations and so they can be accessed using pointers.
(f)  Only limited arithmetic can be done on pointers.

No comments:

Post a Comment