first of all char *p = "techtud" is wrong
char *p means , p can hold only address not a string
to assign it a string u need to assign memory dynamically at runtime or make it as char p[] instead of char* p
if we ignore error and talk about logic then (*ptr)++ this line does this
(*ptr) means value at address that ptr hold and ptr holds base address of array having techtud
so *ptr == t
now (t)++ which is (ascii value of t)++ which is equals to u since it is post increment changes will take place in actual variable to which ptr is pointing
and p will will assigned t coz of post increment