What is the return value of the fork system call in both the parent and child processes?

In the parent process, the return value of the fork is the PID of the newly created child process. This PID value is a positive integer representing the child process, and it allows the parent process to identify and manage the child process. The fork’s return value of 0 in the child process signifies that it is the child process. This return value of 0 distinguishes the child process from the parent process, as the parent receives the PID of the child.