before execution of if there was only one process P1 in the system as soon as if statement is executed a new separate process will be created and it will be a child of p1.
As per fork system call definition on the successful execution of fork system call, 2 process Id is returned, for parent return code is non zero positive number for a child it is zero.
so for parent positive code is returned thus it will not execute code inside if
for a child, it will return zero allowing the child process to get inside if statement.
Now regarding virtual to physical mapping both
child and parent will have the same virtual address of the variable a, but their physical address will be different.
so after execution of if statement parent will have a value of "a" as 100 while the child will have 105 and if you print the address of memory location then both parent and child will print same memory location.
Just try and run this code