c++ - Storing of integer literals when defining variable -
if write such operator:
int a=32; do understand , integer literal 32 storing int number somewhere in code, , then, constant assigned variable a?
not necessarily. int a means "keep sizeof(int) bytes on stack available , let's call a pace, , fill 32 number.
the =, here not assignment (a not exist before: created such), initializer.
and number 32 goes, depends on underlying processor , relative instructions. can go inside code itself, instruction ld (ds+a), 32, ds data-segment pointer, a offset of a variable , 32 bit representation in binary of number 32.
Comments
Post a Comment