Hi i am in a trouble please help me. in my program i had an array
int Maxwordcount[127];
int index=0;
char ltr;
char *typedword;
char word[127][300][30] = {
{............................................................}, // index = 0
{........................................................} // index = 1
............
...................
............................
{"a", "and", "apple","adobe","anvira","avast"}, // index = 65
{"boat", "bat","ball","banner","base","back",bar","boot"}, //index=66
{"cat","coat","can","count","car","cad",.................. }, // index= 67
{"did","do","dad","dog",............................................},
.........
............
...............
{"its","is","ill",........................................................},
........
............
.................
.....................
{"zoo","zib","zoophyte","zebra",.............................} // index = 90
...........
..............
..............
};
// Accept a word from user
printf("Enter the word");
gets(typedword);
ltr = *typeword; // pointer to the word
means
when user press 'apple' , the first letter is a , ie ltr = a . // first letter of the typed word
ascii value of a = 65.
So i want to point wordcount[65][300][30];
and if the typed word is there print the word from the that position from the array ,
and if the word is not found print " not found " .
and if the user typed again " apple " keep the count in Maxwordcount array
please help me ......