Question -
What will be the output of the following program. #include<stdio.h> int main() { int pid; int retvalue; int p[2]; pipe(p); char buff[6]="hello"; pid=fork(); if(pid == 0) { exit(0); } else { sleep(1); close(p[0]); retval = write ( p[1], buff); printf("%d",retval); } }
Options:
A .  The program prints 0
B .  The program prints -1
C .  The program ends abruptly wotout printing anything
Submit Your Solution hear: