P
Parahat Melayev
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
int main()
{
unsigned char *c;
c = malloc(sizeof(unsigned char));
printf("size of unsigned char: %d\n", sizeof(unsigned char));
printf("size of c: %d\n", sizeof(c));
return 0;
}
When I execute this, it says that size of "unsigned char" is "1" & size
of "c" is "4". isn't that strange?
( gcc version 4.0.0 20050519 (Red Hat 4.0.0-8) )
#include <stdlib.h>
#include <limits.h>
int main()
{
unsigned char *c;
c = malloc(sizeof(unsigned char));
printf("size of unsigned char: %d\n", sizeof(unsigned char));
printf("size of c: %d\n", sizeof(c));
return 0;
}
When I execute this, it says that size of "unsigned char" is "1" & size
of "c" is "4". isn't that strange?
( gcc version 4.0.0 20050519 (Red Hat 4.0.0-8) )