Given a list of words we want to find all the words that end with a particular string which is stored in character array "endstr".For example "operating","ing" are valid inputs.For this we have a function "getword" which stores all the words in array wordlist that end with string stored in endstr into targetlist array.it is defined as under
what should be the condition written in if ( ) ?
Rich (BB code):
void getword (char wordlist [ ] [40], char endstr[],int n,char targetlist[ ][40)
{ int i,count;
for(i=0;i<n;i++)
{ if ( )
{strcpy(targetlist[count],wordlist);
count++;}}