Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7. Declarations give names to memory locations so we can identify and use them in our program for storing and retrieving data, in this program,

image text in transcribed

7. Declarations give names to memory locations so we can identify and use them in our program for storing and retrieving data, in this program, integers. List the line numbers where declarations appear in this program.

8. Executable statements actually perform an action when the program runs, and they're converted to machine language by the compiler for the computer to execute. List the line numbers where C executable statements appear in this program.

10. What changes when your program runs if you modify the line with the printf( ) on it where you see the characters %02.lf to be just %d Briefly explain why.

11. What happens if you change the function name printf on line 19 to be puts Briefly explain why.

12. What is a syntax error? Explain in your own words so your peers would understand what you are describing.

13. When we were computing the CELSIUS temperature, we had #define CELSIUS_ADJUSTMENT 0.5555555 but with KELVIN we have #define KELVIN_ADJUSTMENT 0.5555555 + 273.15 Briefly explain why we can't just have the following instead of doing the addition in this define statement. #define KELVIN_ADJUSTMENT 273.755555

14. The preprocessor include directives at the top of the source code contain functions and symbolic constants that are needed by the program. Let's see if we can figure out what each one does. Try removing the first include directive and recompile your program. Then return it and try removing the second include directive and recompile your program. Note the errors you get when they're missing, if any.

12 #define CELSIUS_ADJUSTMENT 0.5555555 13 14 int main () 15 { 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 } double fahrenheit, celsius; // prompt for input from the user printf( "Enter a temperature in fahrenheit: " ); scanf( "lf", &fahrenheit ); // perform the calculation to perform the conversion celsius = ( fahrenheit - 32.0 ) * CELSIUS_ADJUSTMENT; // display the results printf( "0.21f degrees fahrenheit is 10.21f in celsius. ", fahrenheit, celsius ); printf( "AlfF = sf. ", fahrenheit, celsius ); return EXIT_SUCCESS

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions