#include #include #include char* mix_right(int amount, char* text) { char* temp = malloc(strlen(text) + 1); if (temp == NULL) { fprintf(stderr, "ALLOC FAILED, HALTING PROGRAM"); exit(3); } strcpy(temp, text); for (int i = 0; i < amount; i++) { for (int j = 0; j < strlen(text); j++) { if (j - 1 < 0) { temp[j] = text[strlen(text) - 1]; } temp[j] = text[j - 1]; } strcpy(text, temp); } }