Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. What do the following function prototypes tell you about the functions? int froop(double ti void rattleint n int prune(void): 2. Write a program that

image text in transcribed
image text in transcribed
1. What do the following function prototypes tell you about the functions? int froop(double ti void rattleint n int prune(void): 2. Write a program that has main) call a user-defined function that takes a Celsius temperature value as an argument and then returns the equivalent Fahrenheit value. The program should request the Celsius value as input from the user and display the result, as shown in the following code: Please enter a Celsius value: 20 20 degrees Celsius is 68 degrees Fahrenheit. For reference, here is the formula for making the conversion: Fahrenheit 1.8 x degrees Celsius+32.0 3. Write a program that asks the user to enter an hour value and a minute value. The main() function should then pass these two values to a type void function that displays the two values in the format shown in the following sample run: Enter the number of hours:9 Enter the number of minutes: 28 Time: 9.28 4. How would you declare each of the following? actors is an array of 30 char. betsie is an array of 100 short chuck is an array of 13 float. dipsea is an array of 64 long double. 5. Declare an array of five ints and initialize it to the first five odd positive integers. Write a statement that assigns the sum of the first and last elements of the array in the previous Question to the variable even. 6. Create a structure that describes a car. The structure should include the year, the make, and the color of the car 7. Declare a variable of the type defined in Question 7 and initialize it. Print all the members of your structure. 8. 9. Write a program that creates an array of three Cars, initializes them to values of your choice, and then displays the contents of each structure 10. Suppose ted is a double variable. Declare a pointer that points to ted and use the pointer to display ted's value. 11. Suppose treacle is an array of 10 floats. Declare a pointer that points to the first element of treacle and use the pointer to display the first and last elements of the array 12. Write a code fragment that asks the user to enter a positive integer and then creates an array of that many ints 13. What would the following code fragment print if it were part of a valid program? int i, for (i 0i5:i++) cout se t cout ec endl; Write a for loop that prints the values 12 4 8 16 32 64 by increasing the value of a counting variable by a factor of two in each cycle. 14

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

Step: 3

blur-text-image

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

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago