$i$ is called by reference and $j$ is called by value.
So, in function $f()$ only value of $i$ might change,
Now, in function $f(*p,m)$
$*p$ is pointing to $i$
Thus $*p$ is $5$.
$m$ is $10$ because of call by value of $j$.
- $m=10+5$ hence $m=15$
- $*p=5 + 15$ hence $*p=20$, that is, value of variable $i$ is now $20$
- returns nothing
Now, back to main
$i=20$ and $j$ is as it is $10$
Hence, output of printf will be $i+j=20+10 = 30.$