Question
1. When storing data, there are many different data types to choose. What type would be best to store: a. an age (consider the average
1. When storing data, there are many different data types to choose. What type would be best to store: a. an age (consider the average life expectancy of Cat)? b. A temperature for a home thermostat in Maryland? c. The result of a calculation that needs very precise accuracy such as for a dose of medicine? 2. What is wrong with the following expression (assume all variables have been properly declared)? net = ((gross expenses) / 2) % 4) / 9; 3. What value is contained in the integer variable size after the following statements are executed? size = 8; size += size + 12; size = size * 9; size = size / 3; 4. What is contained in the floating point variable depth after the following statements are executed? depth = 2.7; depth = 20 - depth * 4; depth = depth / 5; 5. What value is contained in the integer variable length after the following statements are executed? length = 32; length *= 2+1; length *= length; length /= length;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started