
304 Programming and Data Structures
for(i=0;'<5/'i++)
{
printf ("\n\t%d at location",*(*p+i));
printf ("\t% u at location ",*(p+i));
printf ("%u",p+i);
I
printf ("\n\n Integer requires 2 bytes, address require 4 bytes");
O UTPU T;
Oat location 4036 at location 4046
1 at location 4038 at location 4050
2 at location 4040 at location 4054
3 at location 4042 at location 4058
4 at location 4044 at location 4062
Integer requires 2 bytes, address require 4 bytes
Explanation In the above program the first f o r loop assigns addresses of elements of an integer
array to a pointer array The f i r s t p r i n t f () statement prints element, se