Reverse the content of array using pointer at fixed location

In this program,pointer ptr is used to save the content.Although actual array is not used but it saves n values.The pointer is kept at fixed location and counter i is incremented to save the values.For reversing these values,two extreme memory addresses are considered i.e. i and j.The values are swapped using while loop.Temporay variable t is used for swapping the two adjacent values.The pointer ptr is at fixed location and the counter i and j increments and decrements respectively while swapping the values.When the while loop terminates,the content of array gets reversed.

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

void main()
{
	int num,rem[20],*ptr;
	clrscr();
	printf("\nEnter number:");
	scanf("%d",&num);
	ptr=rem;
	while(num!=0)
	{
		*ptr=num%16;
		num=num/16;
		ptr++;
	}
	ptr--;
	while(ptr>=rem)
	{
		if(*ptr < 10)
			printf("%d",*ptr);
		else
			printf("%c",*ptr+55);
			ptr--;
	}
}