hi all
it give me 4 as output !!!!!!!!!!!!!Code:#include <stdio.h> #include <stdlib.h> main() { char *aa; if((aa=malloc(100 *sizeof(char)))==NULL) { printf("Alloctaing Error\n"); exit(-1); } printf("%d",sizeof(aa)); }
but
gives me 100 !!!Code:#include <stdio.h> #include <stdlib.h> main() { char aa[100]; printf("%d",sizeof(aa)); }
so where is the problem ?
why in the first code when i used malloc it gives me 4 but in the second code give me the object aa size ??
thanks in advance