Home > Back-end >  Is there anyone who can be solved
Is there anyone who can be solved

Time:11-22

Sizeof 2 + 3; 7 bytes is why

CodePudding user response:

This kind of problem, is pulled eggs, no one definition must be four type int,

Equal to 7: sizeof 2 + 3;==sizeof (int) + 3 + 3====4 7

CodePudding user response:

reference 1st floor ctrigger response:
this topic, is pulled eggs, no one definition must be four type int,

Equal to 7: sizeof 2 + 3;==sizeof (int) + 3 + 3====4 7

Thank you! Thank you!

CodePudding user response:

Integer literals are automatically compiled to int, like a floating-point number face amount is automatically compiled to double,
General 32-bit/64 - bit compiler sizeof (int) 4 (that is, reshaping of 4 bytes 32-bit), so the sizeof (int) + 3=4 + 3=7
  • Related