#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;
}
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

Respuesta :

Answer:

a.No output is printed on the screen

Explanation:

As is the function an error will be printed because fork() is not declared in the scope, to define an output we need to see the full content of the code; because 'value' is an integer the 'printf' function is not well defined and the library for execlp is not defined; in general, this code will throw multiple errors in execution.

Ver imagen mateolara11