Alright I did it,
Code:
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <ctype.h>
char word[30],word1[30], word2[30], ch;
char* translate(char Englishword[])
{
int i,j=0;
strcpy(word, Englishword);
ch=word[0];
word1[0] = ch;
int length = strlen(word);
for (i=1;i<length;i++)
{
word2[j] = word[i];
j++;
}
word2[j] = tolower(word1[0]);
char x = toupper(word2[0]);
word2[0]= x;
word2[j+1] = '\0';
printf ("\n now it look like this:%s",word2);
if((length > 1) && (ch == 'a' || ch == 'A'||ch =='e'||ch =='E'||ch =='i'||ch == 'I'||ch =='o'||ch =='O'||ch =='u'||ch =='U'))
{
strcat(word2, "tay");
}
else
{
strcat(word2, "ay");
}
printf ("\n now it looks like this:%s",word2);
return word2;
}
int main()
{
char input[30];
printf ("\n\n enter word: ");
gets (input);
translate(input);
return 0;
}
Now I need to do the linked list part and create translateWord method described above.
Any guidance on the pointers?