Pointers to read long number and split it into odd and even

Input is accepted by variable n.Odd and even numbers are extracted from this variable n using pointers n1 and n2.The variable n is divided by 10 and the remainder is stored in variable r.The quotient obtained after this division is considered as variable n.Then variable r is then divided by 2 and if it returns 0 as remainder ,then the variable r is considered as even number and stored in pointer n2.If 0 is not obtained,then the variable r is considered as odd number and stored in pointer n1.This process continous until the variable n is decremented to 0.

#include < stdio.h >
#include < conio.h > 
#include < alloc.h >

void main()
{
	long *n,*n1,*n2,*m1,*m2,r;
	clrscr();
	n=(long*)malloc(sizeof(long));
	n1=(long*)malloc(sizeof(long));
	n2=(long*)malloc(sizeof(long));
	m1=(long*)malloc(sizeof(long));
	m2=(long*)malloc(sizeof(long));
	printf("\n Enter n:");
	scanf("%ld",n);
	*n1=*n2=0;
	*m1=*m2=1;
	while(*n!=0)
	{
		r=*n % 10;
		*n=*n / 10;
		if(r % 2 ==0) //even
		{
			r=r * *m2;
			*n2=*n2 + r;
			*m2=*m2 * 10;
		}//if
		else
		{
			r=r* *m1;
			*n1=*n1 + r;
			*m1=*m1 * 10;
		}//else
	}//while
	printf("\n n1=%ld n2=%ld",*n1,*n2);
}