Write a function to implement a letter substitution algorithm. Use the following
ID: 3530744 • Letter: W
Question
Write a function to implement a letter substitution algorithm. Use the following prototype for your function: char *substitute( char *input, char *key, char *value ); Where input, key, and value are a zero terminated strings that are input to the function. The first argument, input, contains the string to be transformed. The second argument, key, contains a list of characters for which substitution is required. And the third argument, value, contains the values which are to be substitutes. Suppose that input[i] equals key[j], then output[i] should be set to value[j]. If a value of input is not contained in key then it should be output without substitution.Explanation / Answer
char *substitute( char *input, char *key, char *value ) { int i=0,j,k=0 char *output; while(input[k]!='