The problem is that the *ptr has no values when you assign that to b.So it assigns the garbage value in the *ptr to b.After assigning that only you have get the value of a .Now that a's value will in the *ptr.
So you need to assign the pointer value to b after getting the input from the user.
Code:
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
main()
{
int a , b; // if i put int a = 10 this will let me get value a=10 and b=10
int *ptr;
ptr = &a;
// b = *ptr; // Wrong . Assigning the value in the pointer ( But a has no values so it gives the garbage values
printf("enter a");
scanf("%i",&a);
b = *ptr; // Correct . Assigning the value in the pointer ptr.( Because now the *ptr has the value of a ).
printf("a = %d \n", a);
printf("b = %d \n", b); // i want to get 10 here
getch();
}