Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. void torles(int* array, int* b, int n, int m) {
  2. int last = n, swap, nr = 0;
  3. for (int i = 0; i < n; i++)
  4. for (int j = 0; j < m; j++)
  5. if (array[i] == b[j])
  6. {
  7. swap = array[i];
  8. array[i] = array[last];
  9. array[last] = swap;
  10. last--;
  11. nr++;
  12. }
  13. array = (int*)realloc(array, n - nr);
  14. return array;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement