Question

Choose the best data type for each of the following so that any reasonable value is...

Choose the best data type for each of the following so that any reasonable value is accommodated but no memory storage is wasted. Give an example of a typical value that would be held by the variable, and explain why you chose the type you did.

a. the number of siblings you have

b. your final grade in this class

c. the population of Earth

d. the population of a U.S. county

e. the number of passengers on a bus

f. one player's score in a Scrabble game

g. one team's score in a Major League Baseball game

h. the year an historical event occurred

i. the number of legs on an animal

j. the price of an automobile

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a : short as it will be less than 100
b : char as grades are in A-Z
c : double as it contains big number
d:double as it contains big number
e:short these are fixed and very less
f:short these are less

g:short this will below 1000
h:int it will be below 9999
i:short : max the value is 4
j:float : it is float

Add a comment
Know the answer?
Add Answer to:
Choose the best data type for each of the following so that any reasonable value is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT