char a,*b=&a,**c=&b;
a=2;
**c=2;
b=(int *)**c;
Let address of a be 1000 and b be 1001 and c be 1009.
b = &a; b now contains 1000. (Don't get confused with * as it is part of char * and there is no dereferencing here)
c = &b; So, c now contains 1001.
a = 2; 2 is copied to memory location 1000.
**c = 2; //c contains 1001 and 1001 memory location now contains 1000. Since there is **, we go to memory location 1000, and because c is char**, a byte of memory storing 2 is copied to memory location 1000. (which makes a = 2)
b = (int *) **c;
**c returns 2 due to previous assignment. Now (int *) does a type conversion which makes 2 an address (nothing happens here, compiler just treats 2 as an address). So, now b contains 2.
So, printf a,b, prints 2,2. But assigning integer values to pointers is a bad because dereferencing that location using *, should result in segmentation fault as that shouldn't be a valid memory location.