Bytes allocated by the code ??
- From: "onkar" <onkar.n.m@xxxxxxxxx>
- Date: 28 Nov 2006 10:57:07 -0800
how many bytes will be allocted by following code -
#include<stdio.h>
#define MAXROW 3
#define MAXCOL 4
int main(int argc,char **argv){
int (*p)[MAXCOL];
p=(int (*)[MAXCOL])malloc(sizeof(*p)*MAXROW);
printf("%d\n",sizeof(*p));
return 0;
}
.
- Follow-Ups:
- Re: Bytes allocated by the code ??
- From: Keith Thompson
- Re: Bytes allocated by the code ??
- From: Walter Roberson
- Re: Bytes allocated by the code ??
- From: Tom St Denis
- Re: Bytes allocated by the code ??
- Prev by Date: Re: Code fails with Segmentation Fault
- Next by Date: Re: Code fails with Segmentation Fault
- Previous by thread: Code fails with Segmentation Fault
- Next by thread: Re: Bytes allocated by the code ??
- Index(es):