Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- main(){
- printf("1) int: %d bytes\n", sizeof(int));
- printf("2) char: %d bytes\n", sizeof(char));
- printf("3) float: %d bytes\n", sizeof(float));
- printf("4) double: %d bytes\n", sizeof(double));
- printf("1) short: %d bytes\n", sizeof(short));
- printf("1) long: %d bytes\n", sizeof(long));
- return 0;
- }
- ///OUTPUT
- 1) int: 4 bytes
- 2) char: 1 bytes
- 3) float: 4 bytes
- 4) double: 8 bytes
- 1) short: 2 bytes
- 1) long: 4 bytes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement