Please help me answer completely. I have to choose the correct answers for each
ID: 3880479 • Letter: P
Question
Please help me answer completely. I have to choose the correct answers for each question and I need to give an explanation for each question. Thanks a lot for your help!
Exercise- What data type would you use for the following.. The number of K-6 students in each class The population of major metropolitan areas A business that sells widgets and records the net effect on inventory or the number of items sold minus the returns The TDS (total dissolved solids) in water measured in ppm (parts per million) . Someone who is setting up an aquaponics business and wants to record the dissolved oxygen ppm and the ph level of the soil . The letter grade on an assignment The number of months an employee works before resignation or retirement . . The number of days an employee works before resignation or retirement The conversion of rgb(204, 204, 204) TO #CCCCCC or vice versa Variable Type Character Unsigned character Integer Short Integer Long Integer Unsigned Integer Unsigned Short integer Unsigned Long Integer Float Double Long Double Keyword char unsigned char int short int long int unsigned int unsigned short int unsigned long int float double long double Bytes Required Range 128 to 127 0 to 255 -32768 to 32767 32768 to 32767 -2,147,483,648 to 2,147,438,647 0 to 65535 0 to 65535 0 to 4,294,967,295 1.2E-38 to 2.2E-308 to 3.4E-4932 to 1.1E+4932 2 4 4 10Explanation / Answer
1) for metropolitan we have to use unsigned long it. as it will always be positive and can be huge.
2) for a number of days for an employee before resignation or retirement we have to use long it because in case of retirement value can be large which integer will not be able to handle.
3) for the number of months before retirement or resignation integer will be fine. As a year has 12 months and a person works in an organization for max 60 years, the integer can handle this value.
4)for grade we can use char data type as grades are a b c etc.
5) for calculating TDS unsigned int can be double should be used.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.