0
I need to write a C program that takes a word (string) as a parameter and generates a new string consisting of the original string with the following changes:
The first character of the string must be placed at the end of the string;
The suffix "ay" should be added at the end of this string. Consider that the string received by the program will have a maximum of 100 characters. No use no library function
<string.h>
But I’m having a hard time switching places.
Code:
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char** argv){
char string[101];
char letra[2];
char comp[3]="ay";
int count, i;
printf("String: ");
scanf("%s", string);
for(count=1; string[i]!='\0'; i++){
count++;
}
}