main()
{
char V; //V is a character variable and for it some memory is allocated
// For character variables one byte of memory is allocated
// Let we assume memory cell number 20120 is assigned to V by operating system
char *ptr; //ptr is a pointer variable for that also some memory is allocated
// For pointer variables 4 bytes are allocated in todays systems. May be it may soon
// change as we are having 64bit operaing systems and compilers
V='X';
//We are assigning symbol X to a character variable X such that symbol X's ASCII code
// is stored in V's memory. As V is character variable, we have assigned symbol
ptr = &V; // For pointer variables we can assign only allocated memory cell numbers.
// Here, we are assigning address of variable V to ptr.
// As ptr value is address of V, we call ptr is pointer to V. we can access V value through ptr.
// If ptr is made to point to some other variable, that can be accessed through ptr
// Now, ptr value is 20120
//NOTE: * before a pointer variables in statements other than declaration statements indicates the value in the memory pointed by that pointer variable. This * before a pointer variable is called as indirection operator.
printf("%c %c\n", V, *ptr);
Both give you X as output as ptr is pointer to V.
CHEERS