Question: using c statements Write a function prototype and definition that has the following properties The function should accept 3 arguments, all of type string Remember

using c statements

Write a function prototype and definition that has the following properties

The function should accept 3 arguments, all of type string

Remember that the actual data type keyword for a string is not string, but something else

The function should calculate the minimum string (out of the 3 strings passed in as arguments to the function) according to lexicographical ordering

Comparisons should be done using the

strcmp function

The function should return the minimum string that was calculated

Make sure you choose the correct return data type for the function

Declare 3 strings in the main function and store any arbitrary sequences of characters into these 3 string variables

Call your user-defined function, passing in the 3 string variables declared above, and storing the result in another string variable for holding the minimum string

Since you may not know the length of the result string, you must declare the result string variable using a C statement like the following:

char* result_string;

Print the result string

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!