Parent and child processes share the physical address space as long as both the processes are just reading from there.
When the first one will try to write there, the data from physical address will be copied to a new physical address.
In this question, it doesn't matter which process will execute first.
When $1^{st}$ write took place, they will have different copies of data.
Fork() returns 0 to the child process, so in child process 2 will get printed.
Fork() returns $Pid$ of child process to parent process, so in parent process 0 will get printed.