Actions

EmSys

C - Pointers and Arrays

From EdWiki

Revision as of 09:30, 23 June 2015 by Jshankar (Talk | contribs) (1 revision imported: EdWiki -- Emsys pages from Shukra)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Pointers and Arrays

In C, there is a strong relationship between pointers and arrays. Any operation that can be achieved by subscripting can also be done with pointers.

int ar[10]; 

defines an array ar of size 10, i.e, a block of 10 consecutive integers named ar[0], ar[1], …. ar[9]. The notation ar[i] refers to the i-th element of the array.