```
void moveZeroes(int* nums, int numsSize) {
int j = 0, temp = 0;
for(int i = 0; i < numsSize; i++){
//find the first zero and mark it all the time
if(nums[i] == 0 && nums[j] != 0)
{
j = i;
}
//if the element is not zero, change it with the first zero
if(nums[i] != 0)
{
temp = nums[i];
nums[i]= nums[j];
nums[j] = temp;
//move to the next zero and becmoe the first zero
j++;
}
}
```

}