title: Remove the duplicate strings in from a structure variable array in C programming
body: <p>I am trying to remove the duplicate strings from the struct variable array of the strings(couldn't find the correct term),but the nested for loop at line 67 is not implying over the program(mentioned in code) and I can't understand, why.
  Please help.</p>
  
  <pre><code>  typedef struct nfs {
  
      //This is intialization
      char a[100];
  
      char b[100];
  
      char c[100];
  
    }
    n;
  
    typedef struct trans {
  
      char c[100];
  
    }
    t;
  
    void main() {
  
      int nos, noe;
  
      n list[100];
  
      t cou[100];
  
      printf("Enter the no. of edges ");
  
      scanf("%d", &amp; noe);
  
      printf("Describe edge:\n ");
  
      //Here the values are inserted  
      for (int i = 0; i &lt; noe; i++) {
        printf("\nedge %d: \n", i + 1);
        printf("state %d: ", 1);
        scanf("%s", list[i].a);
        printf("state %d: ", 2);
        scanf("%s", list[i].b);
        printf("distance: ");
        scanf("%s", list[i].c);
      }
      //from here onward the duplication is removed
      for (int i = 0; i &lt; noe; i++) {
        strcpy(cou[i].c, list[i].c);
        printf("%s ", cou[i].c);
      }
      for (int i = 0; i &lt; noe; i++) {
        for (int j = i + 1; j &lt; noe; j++) {
          /* If any duplicate found */
          if (cou[i].c == cou[j].c) {
            /* Delete the current duplicate element */
            for (int k = j; k &lt; noe; k++) {
              cou[k] = cou[k + 1];
            }
            /* Decrement size after removing duplicate element */
            noe = noe - 1;
            /* If shifting of elements occur then don't increment j */
            j = j - 1;
          }
        }
      }
      /*
       * Print array after deleting duplicate elements
       */
      printf("\nArray elements after deleting duplicates : ");
      for (int i = 0; i &lt; noe; i++) {
        printf("\n%s\t", cou[i].c);
  
      }
    } 
  </code></pre>
  
  <p>Here values being printed are the same of the previous array and also the size of noe is the same as before, even after being decremented in the nested for loop.</p>