Overview: Pointers, Readability
Requirements: The below function lacks readability. Change the names of the variables (and the function), write the comments for this function, add spacing and indents, but otherwise leave the code the way it is. Assume that the function has access to these libraries: stdio.h, stdlib.h, and time.h.
void CS1044Assignment(char *x)
{
int y = 0;
char h[5000];
char *a, *b, *c;
a=x;
c=h;
while (*a != ‘\0’)
{
if (!isspace(*a))
{
*(c++)=*a;
}
else
{
b=a;
while (*b == ‘ ‘)
{
b++;
}
a=b;
*(c++) = ‘ ‘;
*(c++)= *a;
}
a++;
}
*c = ‘\0’;
strcpy(x,h);
}