Write a function that, using the strrot function, modifies each string of the given array s out of n strings. The function prototype is:
void rot_all(char *s[], int n);
Here's my code I only don't know how to do the last function.
char rot3(char c) // Function shifts a letter by three spaces (eg 'a' -> 'd')
{
if (c >= 'A' && c <= 'Z') return c += 3;
if (c >= 'a' && c <= 'z') return c += 3;
return c;
}
void strrot(char *str)
{
int d = strlen (str);
for (int i = 0; i < d; i++)
{
str[i] = rot3(str[i]);
}
}
void rot_all(char *s[], int n)
{
}
int main ()
{
char str[23];
scanf("%s",str);
strrot(str);
printf("%s",str);
return 0;
}