Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#include #include int main( ) { int pid; int value = 5; pid = fork( ); if (pid == 0) { execlp(/bin/ls, ls, NULL); value
#include #include
int main( )
{ int pid; int value = 5; pid = fork( ); if (pid == 0) { execlp("/bin/ls", "ls", NULL); value += 10; printf(value); } else { wait(NULL); } return 0; }
Question: What output is printed on the screen when the above program is executed?
a. | No output is printed on the screen | |
b. | 15 | |
c. | 5 | |
d. | 10 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started