+ 3
Is size of data type, differ from 32- bit and 64- bit system? In C
If yes means, please explain why?
2 Answers
+ 5
Not always, you can have two 32 bit compilers having size of *int* as 2 bytes or 4 bytes. it depends on the compiler and how it is implemented. The standard only guarantees that an int will be at least 2 bytes. The size of an int is not always identical to the word size of the target CPU. The size of an int is defined by the compiler implementation, not by the hardware or whether youâre building for 32-bit vs. 64-bit.
so the best way to find the size of different data types is using the "sizeof()" operator
Source : https://www.quora.com/In-C-language-the-integer-takes-2-bytes-for-a-32-bit-compiler-and-4-bytes-for-a-64-bit-compiler-The-float-always-takes-4-bytes-The-character-always-takes-1-byte-So-why-is-there-only-variation-in-the-case-of-integers
+ 2
Thank you so much Arsenic đ