Speciality of void pointer is it can hold address of any type and can be typcasted to any type.
This makes vp holding the address of ch.
printf("%c",*(char *)vp); //outputs 'g'
Here first we type case vp to char pointer and is then dereferenced so it prints "character stored in ch character" i.e g.
printf("%d",*(int *)vp);//outputs 20
Here also first we make vp point to address of int 'j'. Then in printf statement we first typecase vp to int pointer and then dereference it which results in printing the value stored in j i.e 20.
printf("%u",(char *)vp+3); // new printf added and it outputs address of 'f' in "goofy"
printf("%c",*((char *)vp+3)); //outputs 'f'
Here first we make vp point to cp. In 2nd printf we first type cast vp to char pointer and then adds 3 which results in printing the address of 'f' in "goofy". If we still have a doubt whether it really points to f or not, we can see in next printf.