Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
C
#include
int main() { int myVal = 13; printf("Value of integer 'myVal': %d\n", myVal); printf("Size of integer 'myVal': %lu bytes\n", sizeof(myVal)); // 4 bytes printf("Address to 'myVal': %p\n", &myVal); printf("Size of the address to 'myVal': %lu bytes\n", sizeof(&myVal)); // 8 bytes return 0; } //C
C result:
Value of integer 'myVal': 4
Size of integer 'myVal': 4 bytes
Address to 'myVal': 0x7ffd87ddb7c4
Size of the address to 'myVal': 8 bytes