thanks ankit and ramya..:)

On Wed, Jul 27, 2011 at 5:42 PM, Ankit <[email protected]> wrote:

> p is a pointer to an array of 4 ints.
> sizeof(p) gives the size of the pointer which is an int and sizeof(*p)
> gives the size of the array it points (4*4=16)
>
> On Jul 27, 3:44 pm, Kamakshii Aggarwal <[email protected]> wrote:
> > #include<stdio.h>
> > # define MAXROW 3
> > #define MAXCOL 4
> >
> > int main()
> > {
> >     int (*p)[MAXCOL];
> >     p=(int(*)[MAXCOL])malloc(MAXROW*sizeof(*p));
> >     printf("%d %d",sizeof(p),sizeof(*p));
> >
> >  system("pause");
> >
> >   return 0;
> >
> > }
> >
> > THE O/P IS 4 16.
> > I am not getting the reason.plss help
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
Regards,
Kamakshi
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to