My question is for C programming. Write a complete program by using four helper functions The whole requested parts should be written in one single program. For all the functions, use the same prototype. Do not hard code any value, all the values must be given by the user in the whole code. The first function is getting a string and prints the given string, use the same given prototype: void myname ( char firstlastname[ ]); when you test the program, you will call the function in the main, the input will be your name ( you will prompt the user) and the functions prints it completely. The second function which you will add to the program will take 3 integer values and return the average all the 3 integer values, use the same prototype which is given here: double ave ( int num1, int num2, int num3); Call the function in the main, ask the user for 3 values. Test case for 3 given values by the user: 3 5 2 The third function will accept an array of numbers and prints it in the reverse order. void ptr_r (int arr[ ]); for testing this part you will call the function in the main with array int test[5]; you will get values from the user, and the function ptr_r, prints that in the reverse order. User input for the test case is: 100 200 0 -99 22 And after the call it shows: 22 -99 0 200 100 The fourth function will find the max value in the array test[5], which user added before. int maxi( int arr[ ]); based on the given values from the user, when you call the function, it returns 200. At the end of the code, print the number of the characters, that you have added for the string ( your name) with the use of a function of string.h library. You should get one screenshot which shows all the functions and requested options work
My question is for C programming.
Write a complete program by using four helper functions The whole requested parts should be written in one single program. For all the functions, use the same prototype. Do not hard code any value, all the values must be given by the user in the whole code.
The first function is getting a string and prints the given string, use the same given prototype:
void myname ( char firstlastname[ ]);
when you test the program, you will call the function in the main, the input will be your name ( you will prompt the user) and the functions prints it completely.
The second function which you will add to the program will take 3 integer values and return the average all the 3 integer values, use the same prototype which is given here:
double ave ( int num1, int num2, int num3);
Call the function in the main, ask the user for 3 values.
Test case for 3 given values by the user: 3 5 2
The third function will accept an array of numbers and prints it in the reverse order.
void ptr_r (int arr[ ]);
for testing this part you will call the function in the main with array int test[5];
you will get values from the user, and the function ptr_r, prints that in the reverse order.
User input for the test case is:
100 200 0 -99 22
And after the call it shows:
22 -99 0 200 100
The fourth function will find the max value in the array test[5], which user added before.
int maxi( int arr[ ]);
based on the given values from the user, when you call the function, it returns 200.
At the end of the code, print the number of the characters, that you have added for the string ( your name) with the use of a function of string.h library.
You should get one screenshot which shows all the functions and requested options work.
Step by step
Solved in 2 steps with 1 images