System Programming

Hard 30 points

Create a program that uses system calls to create a child process with fork().

C system programming allows interacting with the operating system. fork() creates a child process, exec() executes a program, wait() waits for a process.

Well done! 🎉
Your answer is correct! You earned 30 points.
Not quite...
Try again! You can do it.

Your code

Hint
Use pid_t pid = fork(); to create a child process. Check pid to distinguish parent and child.

Result

Click "Run code" to see the result of your code. Click "Submit" to check if your answer is correct.