// child process because return value zero
if (fork() == 0)
printf("Hello from Child!\n");
// parent process because return value non-zero.
printf("Hello from Parent!\n");
Please someone explain how things are working?
check the links which is provided in the answer https://gateoverflow.in/242749/self-doubt