Here is my code, it does not work, but maybe it will help you.
I tried to debug it, the problem part will be the loop at the end.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){
char buffer[80];
char word[80];
char word2[80];
scanf("%s",word);
strcpy(buffer, word);
int i;
int counter=0;
for(i=0;i<80;i++)
{
word2[i]="";
}
for(i=0;i<strlen(buffer);i++)
{
if(buffer[i]=="a" || buffer[i]=="e" || buffer[i]=="i" || buffer[i]=="o" || buffer[i]=="u" || buffer[i]=="A" || buffer[i]=="E" || buffer[i]=="I" || buffer[i]=="O" || buffer[i]=="U")
// if(strcmp(buffer[i],"a")==0)
{
strcat(word2,"+");
counter++;
}else{
strcat(word2,buffer[i]);
}
}
printf("The modified string is %s",word2);
printf("in total there was %d vowels.",counter);
return 0;
}