Convert into Mips
#include <stdio.h>
#include <string.h>
/**
* @brief Function finds locations to chars matching the token in given string, stores in an array of pointers
*/
void delim(char* str, char token);
/**
* @brief Function sorts words from given string into alphabetical order
*/
void sort(char* str, char* loc[], int loc_len);
void main()
{
char str[40];
char* ptr = str;
fgets(ptr, 40, stdin);
delim(ptr, ‘ ‘);
printf(“n%sn”, ptr);
return;
}
void delim(char* str, char token)
{
char* loc[40] = { NULL };
int j = 0;
int length = strlen(str);
loc[j] = str;
j++;
for (int i = 1; i < length; i++)
{
if (*(str + i) == token)
{
loc[j] = str + i + 1;
*(str + i) = ‘