You are debugging a C program and notice that a variable intended to store large numbers is not holding the values correctly. What might be the issue with the data type used?

  • The issue might be with using an int data type.
  • The issue might be with using a float data type.
  • The issue might be with using a double data type.
  • The issue might be with using a short data type.
The correct option is 3. When dealing with large numbers, it's more appropriate to use a double data type because it provides greater precision compared to int and float, which may result in loss of precision for large numbers. short data type is typically used for smaller integers.
Add your answer
Loading...

Leave a comment

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