Question: #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
Lets analyze what happens step by step when the given C program is executed Step 1 Library Inclusion... View full answer
Get step-by-step solutions from verified subject matter experts
