What are the data sizes of all the primitive datatypes on a Metro M4 Express SAMD51 C++ implementation? In some C++ implementations, int has 16 bits and in other implementations it has 32 bits. Is

  • 1
    It depends on compiler's data model for target processor. But I'd rather use int16_t/int32_t instead. It's much better for portability. – KIIV Oct 28 '19 at 19:40

And that is the only difference in fundamental type sizes. On 8-bit Arduinos int is 16 bit and on 32-bit int is 32 bit.

  • short is 16 bit
  • long is 32 bit
  • long long is 64 bit


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.