must. get. 64-bit machine.

This commit is contained in:
Dan Buch 2011-06-18 19:28:20 -04:00
parent 70d09f33a1
commit a414f515d1

View File

@ -0,0 +1,29 @@
/**
* :author: Dan Buch (daniel.buch@gmail.com)
*/
#include <stdlib.h>
#include <stdio.h>
int main()
{
int* p;
size_t size_of_int = sizeof(int);
printf("sizeof(int) = %d\n", size_of_int);
p = (int*)malloc(sizeof(int));
size_t size_of_p = sizeof(p);
printf("sizeof(p) = %d\n", size_of_p);
*p = 10;
size_t size_of_ptr_p = sizeof(*p);
printf("sizeof(*p) = %d\n", size_of_ptr_p);
return 0;
}
/* vim:filetype=c:fileencoding=utf-8
*/