Code:
int RemoveDup(int inpArr[],int size, int outArr[])
{
	int i,j;
	for(i=0,j=0;i<size;i++)
	{
		if(i==0)
		{
			outArr[j++] = inpArr[i];
			continue;
		}
		if(inpArr[i]!=inpArr[i+1])
			outArr[j++] = inpArr[i];
	}
	return j;
}