Program in c:- Create four float variables; a1, a2, a3, and a4.- Ask the user for and place a distinct value in each (no two should have thesame 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 functionprototype 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 variableswhich, when called, will sort the values pointed to from Low to high (lowestin 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 pointervariables which, when called, will double the value stored in the pointed tovariables. 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.
Program in c:
- 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.
Unlock instant AI solutions
Tap the button
to generate a solution