title: C: Print only not common elements in 2 arrays
body: <p>I have some C code I want to modify really simple.</p>
  
  <p>Let's say I have two arrays like this </p>
  
  <pre><code>   int v1[5] = {1, 3, 7, 13, 10};
     int v2[2] = {1, 10};
  </code></pre>
  
  <p>And I would like to print the not common elements (difference) like:</p>
  
  <pre><code>3, 7, 13
  </code></pre>
  
  <p>Here is my attempt which is not enough yet:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      int v1[5] = { 1, 3, 7, 13, 10 };
      int v2[2] = { 1, 10 };
  
      for (int i = 0; i &lt; sizeof(v1) / (sizeof * v1); i++) {
          for (int j = 0; j &lt; sizeof(v2) / (sizeof * v2); j++) {
              if (v1[i] != v2[j]) {
                  printf("%d ", v1[i]);
                  break;
              } else {
                  break;
              }
          }
      }
  
      return 0;
  }
  </code></pre>
  
  <p>The two arrays will be always really short (max 6 elements). Thery are not ordered and I should not modify them. The elements in each of them are unique, that is each number can only appear 1 time in each array. v2 will only contains a subset of element from v1.
  What would be the most efficient way to achieve this?</p>