Is number of variables affect the quality of our code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Is number of variables affect the quality of our code?

11th Nov 2018, 5:59 AM
Krishan
Krishan - avatar
2 Answers
+ 5
If you place your variables properly, within the scopes where they are used it will do you least harm, and don't forget there are arrays and containers, which take more memory than those of the basic types, an array of int with 10 elements takes as much as ten int variable : ) Hth, cmiiw
11th Nov 2018, 6:31 AM
Ipang
0
Yes definitely, memory management is the first case you have to lookup for.
11th Nov 2018, 6:07 AM
Manikanth Vanka
Manikanth Vanka - avatar