QUESTION IMAGE
Question
- what is the difference between an int type and a double type?
a. int is for whole numbers and double is used for fractions/decimal numbers.
b. int and double are used for the same thing, but double takes up more memory.
c. int and double are used for the same thing, but int takes up more memory.
d. they are the same thing, but with different names.
In programming, int is a data - type for whole numbers (integers), while double is a floating - point data type for numbers with fractional parts. Double also typically takes up more memory than int. Option a correctly describes their usage in terms of the types of numbers they represent.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
a. int is for whole numbers and double is used for fractions/decimal numbers.