I want to know by the example below if the child's address space affect the parent's address space. So will the parent get the changed value of the child to 15 or it will get the value 5. I learnd that child's address space is not affected by its parent's one but what will be the output in this case? Will the output of value be 20 since it the value is incremented by 15 on child's part?
int value = 5;
int main(){
pid_t pid;
pid = fork();
if (pid == 0){
value +=15;
return 0;
}
else if(pid > 0){
wait(NULL);
printf("Parent: value = '%d', value); // Line A
return 0;
}
}