Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sizeof(char)
- *p is a character == 1 byte.
- p is a pointer == 4 bytes.
- &p is an address of a pointer == 4 bytes. Same as char**
- sizeof (char) = 1
- sizeof (void *) = 4
- sizeof 65; /* same as `sizeof (int);` */
- sizeof 'X'; /* same as `sizeof (int);` */
- sizeof 42.0; /* same as `sizeof (double);` */
- float f;
- sizeof f; /* same as `sizeof (float);` */
- /* etc ... */
- #include <math.h>
- sizeof (12 * log(100)); /* same as `sizeof (double);` */
- /* without the parenthesis, this would be */
- /* (sizeof 12) * log(100); */
- sizeof 'a' == 1 // C++
- sizeof 'a' == 4 /* C */
Add Comment
Please, Sign In to add comment