title: Find the duplicate element from an integer
body: <p>Last week I attended interview. They asked a question for finding a duplicate element in integer value.I know program using array but they asked to me without array. Please help me for finding duplicate element in integer without array.</p>
  
  <p>Question:</p>
  
  <p><strong>Find the duplicate element from an integer display the element without the duplicate number. Like I/P:43456 O/P:4356. Condition: no array should be used</strong></p>
  
  <p>Coding:</p>
  
  <pre><code>void printRepeating(int arr[], int size) {
      int i;
      printf("The repeating elements are: \n");
      for (i = 0; i &lt; size; i++) {
          if (arr[abs(arr[i])] &gt;= 0)
              arr[abs(arr[i])] = -arr[abs(arr[i])]; elseprintf(" %d ", abs(arr[i]));
      }
  }
  int main() {
      int arr[] = { 1, 2, 3, 1, 3, 6, 6 };
      int arr_size = sizeof(arr) / sizeof(arr[0]);
      printRepeating(arr, arr_size);
      getchar();
      return 0;
  }
  </code></pre>