Whether variable name in any programming language takes memory space

后端 未结 10 1600
时光说笑
时光说笑 2021-01-05 17:44

e.g.

int a=3;//-----------------------(1)

and

int a_long_variable_name_used_instead_of_small_one=3;//-------------(2)
         


        
10条回答
  •  孤独总比滥情好
    2021-01-05 18:09

    Both occupy the same amount of memory. Variable names are just to help you, the programmer, remember what the variable is for, and to help the compiler associate different uses of the same variable. With the exception of debugging symbols, they make no appearance in the compiled code.

提交回复
热议问题