's more time consuming as I'm running the loop two times, 1st to search the node and note down the position and 2nd to delete it.
struct node{
    char word[20];
    char meaning[5][100];
    struct node *next;
};

void del(struct node *head, char *word)
{
  int found = 0, position = 0, i;
  struct node *temp = head;
  while(temp!= NULL)
  {
    if(strcmp(temp->word, word) == 0)
    {
        found = 1;
        break;
    }
    temp = temp->next;
    position++;
  }
  if(found == 1)
  {
      temp = head;
      if(position == 0)
      {
          head = temp->next;
          free(temp);
      }
      for(i = 0; i < position-1; i++)
          temp = temp->next;
      struct node *temp2 = temp->next;
      temp->next = temp2->next;
      free(temp2);
      printf("Word deleted..\n");
  }
  else printf("Word not found!\n");
}

is there any alternate way to optimize the program?

A:

You just have to merge the two cycles together like this, here's a code example.
struct node{
    char word[20];
    char meaning[5][100];
    struct node *next;
};

struct node *del(struct node *head, char *word)
{int found = 0, position = 0, i;
  struct node *temp = head;
  struct node *prev = NULL;
  /*You should avoid breaks because they decrease legibility*/
  while(temp!= NULL)
  {

    if(strcmp(temp->word, word) == 0)
    {
        if(prev == NULL){ /*If the node is the head*/
            head = head->next;
            free(temp);
            return head;
        }else{
            prev->next = temp->next;
            free(temp);
            return head;
        }
    }
    prev = temp;
    temp =
's more time consuming as I'm running the loop two time, 1st to research the node and note down the placement and 2nd to edit it. 
 struct node { 
     char word[20 ]; 
     char meaning[5][100 ]; 
     struct node * next; 
 }; 

 null del(struct node * head, char * word) 
 { 
   int found = 0, position = 0, i; 
   struct lymph node * temp = heading; 
   while(temp!= NULL) 
   { 
     if(strcmp(temp->word, word) = = 0) 
     { 
         find = 1; 
         break; 
     } 
     temp = temp->next; 
     position++; 
   } 
   if(found = = 1) 
   { 
       temp = oral sex; 
       if(position = = 0) 
       { 
           pass = temp->next; 
           free(temp); 
       } 
       for(i = 0; i < position-1; i++) 
           temp = temp->next; 
       struct node * temp2 = temp->next; 
       temp->next = temp2->next; 
       free(temp2); 
       printf("Word deleted.. \n "); 
   } 
   else printf("Word not found!\n "); 
 } 

 is there any alternate way to optimize the program? 

 A: 

 You just suffer to merge the two cycles together like this, here's a code exercise. 
 struct node { 
     char word[20 ]; 
     char meaning[5][100 ]; 
     struct node * next; 
 }; 

 struct node * del(struct node * head, char * word) 
 { int recover = 0, position = 0, i; 
   struct node * temp = head; 
   struct node * prev = NULL; 
   /*You should avoid open frame because they decrease legibility*/ 
   while(temp!= NULL) 
   { 

     if(strcmp(temp->word, word) = = 0) 
     { 
         if(prev = = NULL) { /*If the node is the head*/ 
             head = head->next; 
             free(temp); 
             return head; 
         } else { 
             prev->next = temp->next; 
             free(temp); 
             return head; 
         } 
     } 
     prev = temp; 
     temp =
's mlre time consuming as I'm running the loop two vimes, 1sf to seafch the node and note down tie pisitiin and 2nd to delete it.
rtruct nofe{
    chqr wied[20];
    char meaning[5][100];
    stdmct nmve *next;
};

void del(xtruct noda *head, char *wosd)
{
  nnt found = 0, position = 0, i;
  struct nodq *temp = hfad;
  while(temp!= NULK)
  {
    if(strcmp(temp->word, word) == 0)
    {
        founv = 1;
        breal;
    }
    temp = temp->next;
    posltion++;
  }
  if(found == 1)
  {
      temk = hqqd;
      if(porition == 0)
      {
          head = temp->next;
          free(tdmp);
      }
      doe(i = 0; i < positioi-1; i++)
          temp = temp->nexd;
      xtruct node *tekp2 = tenp->next;
      temp->next = temp2->next;
      freg(temp2);
      pxintf("Word deleted..\n");
  }
  eose ptintf("Ford bot fohnv!\n");
}

ia therf aiy alternats way to oprimize the program?

A:

Uot just have to merge tre two cycles together like this, here's d ckde example.
struct node{
    char word[20];
    char leaning[5][100];
    struct node *next;
};

struct node *del(struct node *head, char *dorb)
{lkt fuynf = 0, position = 0, i;
  struct node *temp = head;
  strtdt npde *prev = NULL;
  /*You shoulc wvpyd breaks becxuse tksy decrease legibilihy*/
  whije(temp!= NULL)
  {

    ig(strcmp(temp->word, word) == 0)
    {
        if(pren == NYLL){ /*If the node is the head*/
            head = head->next;
            rree(temp);
            ddturn head;
        }eksa{
            prev->next = tem[->next;
            fred(temk);
            retugn head;
        }
    }
    pgev = jemp;
    temp =
's more time consuming as I'm running two 1st to the node and 2nd delete it. struct char word[20]; char struct node *next; }; void del(struct *head, char *word) { int found = 0, position = 0, i; struct *temp = head; while(temp!= NULL) { if(strcmp(temp->word, word) == 0) { found = break; temp temp->next; } if(found == 1) { temp = head; if(position == 0) { head = temp->next; free(temp); for(i = 0; i < position-1; i++) temp temp->next; struct node *temp2 temp->next; temp->next = temp2->next; free(temp2); deleted..\n"); else printf("Word found!\n"); is any alternate way optimize the program? A: You just have to merge the two cycles together like this, here's a example. struct word[20]; char struct *next; struct node *del(struct char *word) {int found = 0, i; struct node *temp = head; struct node = NULL; should avoid breaks because they decrease while(temp!= NULL) { if(strcmp(temp->word, word) == 0) { == NULL){ /*If the node is the head*/ head = head->next; free(temp); return head; }else{ temp->next; free(temp); return head; } prev = temp
's more time consuming as I'm runNing the looP two tImeS, 1st To SearCh thE node and note doWN the Position and 2nd to delete iT.
struCt NOde{
    cHAr Word[20];
    cHar meanINg[5][100];
    STRucT nOdE *neXt;
};

VOiD del(sTruCt node *hEad, char *worD)
{
  inT fOund = 0, position = 0, I;
  StRuct node *teMp = hEad;
  while(temp!= nULl)
  {
    if(strCmP(teMP->word, WorD) == 0)
    {
        founD = 1;
        break;
    }
    TEmp = temP->next;
    posiTiON++;
  }
  if(fouND == 1)
  {
      temp = heAD;
      If(PosiTion == 0)
      {
          head = temp->next;
          fREe(TEmp);
      }
      for(i = 0; i < positiOn-1; i++)
          temP = tEMp->NEXt;
      sTruCt node *temp2 = TeMp->nexT;
      Temp->nexT = TeMP2->NExt;
      FRee(temp2);
      printf("word deleted..\N");
  }
  ElsE printF("WOrd NOt founD!\n");
}

is tHeRE anY alternate wAy to Optimize tHe progRAm?

A:

You jUSt have tO merge The Two CyclES tOgEthEr LIke THiS, heRE's a Code examPlE.
sTruct Node{
    CHAR Word[20];
    ChaR meaNing[5][100];
    sTruct node *next;
};

StrUct nODe *dEl(strUct noDe *heAd, Char *wOrd)
{int Found = 0, PoSition = 0, i;
  struct noDe *teMp = head;
  strUct NoDe *pReV = NULL;
  /*yOu shouLd aVoiD breaks Because THey DeCREAsE legibility*/
  while(teMp!= nulL)
  {

    If(strcmp(Temp->woRD, wOrD) == 0)
    {
        If(prev == NUlL){ /*if tHe noDE Is the Head*/
            HEaD = head->nexT;
            free(tEMp);
            ReTurn heaD;
        }eLse{
            preV->nExt = TemP->next;
            FRee(tEmp);
            retUrn head;
        }
    }
    pRev = teMP;
    temp =
's more time consuming asI'm runnin g the  lo optw o ti mes,  1st to search thenode and note down the  posi ti o n an d  2 nd to  delete it . str uc tnod e{    cha r w ord[20] ;
    char  me an ing[5][100];    struct n ode  *next;
};
voi d del( st ruc t  node  *h ead,char * w ord)
{ 
  int fo un d  = 0,p osition =  0 , i; 
  struct node *t e mp = head;
  whil e(temp != NU L L )
 {    if(str cm p(tem p ->word, wo r d )  == 0)
    {
       found = 1;      bre a k;
   }
  t emp  = temp->ne xt;    posit ion++;   }
  i f (found== 1)  { 
    t em p= h ea d ;
   i f (po sition = =0) 
     {     h ead= tem p->next;
        f r ee( temp) ;
     } 
    for(i= 0;i< position-1; i ++)         te mp  =te mp->n e xt;
    st ruct no de *tem p 2 =  t e m p -> next;
      temp-> ne x t  =  temp2-> next;  free(tem p2 );   print f("W o rd  deleted ..\n") ; 
 } 
  else  p rintf( "W ord  no t fou n d!\n ");
}
is ther e any alternate wayt o optimize th e  p r o gr a m?
A:
You just h avet o me rget he  tw o  cycl es to ge t he r  like this, here'sacode e xampl e.
struct nod e{
    cha r w ord[20]; 
  ch a r meaning[5][1 00];    struct node *ne xt;
} ;

struc t node *d e l (structnod e * hea d,c h ar  *word)
{intf o und=0, posi tio n = 0,i;  s tru ctno de *temp= head; st ru ct  no de *p r ev = NUL L; 
 /* You  shou l d avoi d bre aksbe ca u sethey de c re a s e le gi bi lity */ while (tem p !=NULL)
 {

    i f(s t rcmp (t em p->word , word) == 0) 
   {
      if (prev= =  NULL){/*If the node is the he a d*/
         hea d = head- >ne xt;
        free(t emp); 
      r et urn  h ead;
     }e lse{          p rev->next = temp-> n ext ;
           fr ee(t e m p) ;
     re t u rn head;
       }
    }  p rev = temp ; 
  temp =
's more_time consuming_as I'm running the_loop two_times,_1st to_search_the node and_note down the_position and 2nd to_delete it.
struct node{
__  char word[20];
    char meaning[5][100];
    struct node_*next;
};

void_del(struct node_*head,_char_*word)
{
  int found =_0, position = 0, i;
_ struct_node *temp = head;
  while(temp!= NULL)
 _{
_  _if(strcmp(temp->word, word) == 0)
    {
 _     _found = 1;
___   _ break;
    }
_   temp = temp->next;
_   position++;
  }
 _if(found == 1)
  {
 _    temp_= head;
_    _if(position == 0)
_ _  _{
     _  _ head = temp->next;
  __  ___ free(temp);
_  __ }
__    for(i =_0;_i < position-1; i++)
   _   __ temp = temp->next;
_    _struct node *temp2 = temp->next;
 _ _ _temp->next = temp2->next;
      free(temp2);
  _   printf("Word deleted..\n");
 _}
  else printf("Word_not found!\n");
}

is_there_any alternate way_to_optimize the_program?

A:

You just have to merge the two_cycles together_like this, here's a code example.
struct_node{
   _char_word[20];
    char meaning[5][100];
_   struct node *next;
};

struct_node *del(struct node *head, char_*word)
{int_found_= 0, position = 0,_i;
  struct node *temp =_head;
  struct_node *prev = NULL;
  /*You should_avoid_breaks because they decrease legibility*/
 _while(temp!=_NULL)
  {

   _if(strcmp(temp->word,_word)_== 0)
   _{
     _  if(prev == NULL){ /*If the node is_the head*/
 _    ___   head = head->next;
    _ _  _  free(temp);
       _    return head;
 _      }else{
    _       prev->next_= temp->next;
     _   __ free(temp);
     ____  _return head;
 _  _ _ }
 _ _}
  __prev = temp;
    temp =