Wednesday, October 21, 2009

RAGGED ARRARY

The two-dimensional array character type arrays occupy a fixed amount of memory space for each row that is rarely needed .Therefore , instead of making each row fixed number of characters . We can make it a pointer to a string of varying length.
The character Arrays with the rows of varying length are called "RAGGED ARRAY " and are better handled by pointer . For example :
char *cname[3] = {"india", "nepal" ,"bhutan"}; // is the declaration and intialisation of Ragged Array.

No comments:

Post a Comment