Answer to Question #49874 in C++ for ama nae

Question #49874
#include <stdio.h> #include <sys/types.h> #include <wait.h> pid_t wait(int *status); void fork9(); void main() { fork9(); } void fork9() { int child_status; if (fork() == 0) { printf("HC: hello from child\n"); } else { printf("HP: hello from parent\n"); wait(&child_status); printf("CT: child has terminated\n"); } printf("Bye\n"); exit(0); } Remove statement wait(&child_status); and compile and execute the program. Explain the answer.
Expert's answer

Not answered

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS
paypal