Program in c:
-Work all functions under main
- Create four float variables; a1, a2, a3, and a4.
- Ask the user for and place a distinct value in each (no two should have the
same value).
- Create a function named “batman” that outputs the values of a1, a2, a3,
and a4 to the screen on one line in the same listed order. The function
prototype should be:
void batman(float a, float b, float c, float d);
- Call the function batman on a1, a2, a3, a4.
- Print a new line with a printf statement.
- Create a function named “superman” that has four float pointer variables
which, when called, will sort the values pointed to from Low to high (lowest
in a1, highest in a4). The function prototype should be:
void superman(float *x1, float *x2, float *x3, float *x4)
- Call the function superman on the addresses of a1, a2, a3, a4.
- Call the function batman on a1, a2, a3, a4.
- Print a new line with a printf statement.
- Create a function named “wonder woman” that has four float pointer
variables which, when called, will double the value stored in the pointed to
variables. The function prototype should be:
void wonderwoman(float *x1, float *x2, float *x3, float *x4)
- Call the function wonderwoman on the addresses of a1, a2, a3, a4.
- Call the function batman on a1, a2, a3, a4.
to generate a solution
a solution
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education