Saturday, August 30, 2014

sizeof void * char*

size of void * & char * in 32 bit machine



root@selvakumar-Lenovo-B460e:/C_pgms/sizeof# cat size.c #include<stdio.h> /* */ int main() { printf("size of char * = %d\n",sizeof(char *)); printf("size of void * = %d\n",sizeof(void *)); return 0; } root@selvakumar-Lenovo-B460e:/C_pgms/sizeof# gcc size.c root@selvakumar-Lenovo-B460e:/C_pgms/sizeof# ./a.out size of char * = 4 size of void * = 4 root@selvakumar-Lenovo-B460e:/C_pgms/sizeof#

No comments:

Post a Comment