New course! Every coder should learn Generative AI!
Try a free lesson+ 2
C++
How many bytes does int carry
7 Answers
+ 2
it depend on the compiler to compiler
in turbo it is 2 bytes
and in codeblocks it is 4 bytes.
+ 1
2 bytes
+ 1
2
+ 1
you can use the keyword "sizeof" that it return bytes of data type
example:
int n;
cout<<sizeof(n);//4 bytes
+ 1
2 bytes in 32 bit machine
+ 1
4 bytes in 64 bit machine
0
Use sizeof(), it depends on architecture