Choose the best data type for each of the following so that any reasonable value
ID: 3662633 • Letter: C
Question
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. the number of siblings you have your final grade in this class the population of Earth the population of a U.S county the number of passengers on a bus one player's score in a Scrabble game one team's score in a Major League Baseball game the year an historical event occurred the number of legs on an animalExplanation / Answer
a.
short no_sib=2;
b.
float f_grade=4.5;
c.
long popul=1000000000;
d.
long us_pop=50000000;
e.
short no_pass=30;
f.
int score=300;
g.
short score=100;
h.
int year=1887;
i.
short legs=4;
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.