/*
* This code remplaces all 'r' in str to 'a' in str himself
* Really simple to understand, but maybe not to write
*/
#include <stdio.h>
#include <string.h>
int main() {
char str[]="azertyuik";
char *str2;
str2=str;
str2=index(str, 'r');
while(str2) {
str2[0]='a';
str2=index(str, 'r');
}
printf("%s\n", str);
}