Integer Memory | Sololearn: Learn to code for FREE!


Integer Memory

Soo imagine that im writing a program and i only work with integers, and those integers are all from 0 to 10, would be better to replace all my variable declarations for the type "short"? and use 2 bytes less? In fact why dont i use the type char since it can also store integers that fit into 1 byte of memory? Is this correct? or should i use int instead of other types?

9/25/2019 6:37:07 PM


1 Answer

New Answer


Tricky decision. See here for details