In a Go program, you're dealing with a large dataset where memory optimization is crucial. Which data type would you choose to represent a set of integer values ranging from -128 to 127?

  • int16
  • int32
  • int64
  • int8
The int8 data type is suitable for representing integer values ranging from -128 to 127. Its memory footprint is smaller compared to other integer types, which helps optimize memory usage in large datasets.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *