+ 1
Is 1 byte 1 integer?
6 Respostas
+ 4
1 Byte can at max represent a number from a range of 0-255...
So It cannot represent an integer as C++ offers you a range of 0-65535...
+ 3
printf("sizeof(int): %d bytes", (int) sizeof(int));
// run it
+ 3
no 1 integer = 4 bytes
c++ program to check bytes.
int val=7;
cout<<sizeof(val);
+ 1
1 integer takes 2 bytes while 1 floating point Number takes 4 bytes
0
why would you want it to take more bytes?
- 2
1 integer 2 bytes