Program to show Memory Allocation by variables in Program & Arrays use in Program.




#include
#include
#define MAXROW 3
#define MAXCOL 4
void main() {
int (*p)[MAXCOL];
printf("\n%d",sizeof(*p));
//p=(int (*)[MAXCOL])
p=(int *)malloc(MAXROW * sizeof(*p));
printf("\n%d",sizeof(*p));
}

No comments:

Post a Comment