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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started