Explain the concept of array of pointers. Using pointers write a program to test whether the given string is a palindrome or not. 10
ARRAY OF POINTERS
The way there can be an array of integers, or an array of float numbers, similarly, there can be array of pointers too. Since a pointer contains an address, an array of pointers would be a collection of addresses. For example, a multidimensional array can be expressed in terms of an array of pointers rather than a pointer to a group of contiguous arrays.
4 5 6
7 8 9
Two-dimensional array can be defined as a one-dimensional array of integer pointers
rather than the conventional array definition,
Similarly, an n-dimensional array can be defined as (n-1)-dimensional array of pointers by writing
data-type *arr[subscript 1] [subscript 2]…. [subscript n-1];
The subscript1, subscript2 indicate the maximum number of elements associated with each subscript.
Solved program can be found on this link http://cssimplified.com/assignments/an-interactive-c-program-to-check-whether-the-given-string-is-a-palindrome-or-not-using-pointers
(c) Differentiate between
(i)Various storage classes 6
Solved program can be found on this link http://cssimplified.com/c-programming/explain-various-types-of-storage-classes-in-c-with-example-for-each
(ii)Structure and union 4
Solved program can be found on this link http://cssimplified.com/c-programming/what-are-the-differences-between-structure-and-union-give-example-of-usage-of-the-union-8m-jun2008