In option A – the 3rd expression is overridden when again p1 is used.
In option C – the 2nd expression is wrong as p2 is not initialized before but used.
In option D – the 2nd expression is wrong as p is not initialized before but used.
Here each and every variable used are distinct. So the answer is (B).