0 votes 0 votes void main() { int n = 1; if(fork()==0) { n = n<<1; printf(“%d, “, n); n = n <<1; } if(fork()==0) n=n+700; printf(“%d, “,n); } Which of the following output is not possible? 2,4,1,701,704 1,2,4,704,701 2,704,4,701,1 1,704,2,4,701 Operating System fork-system-call operating-system programming-in-c + – Erwin Smith asked Apr 11, 2023 • edited Jul 6, 2023 by Hira Thakur Erwin Smith 814 views answer comment Share Follow See 1 comment See all 1 1 comment reply Amarnathkumar commented Aug 28, 2023 reply Follow Share Option d, as program will print 2 before 704 which is contradicted by option d. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes As all five values are possible . Due to context switch every option is Possible. So i think none is wrong. Sahil_Lather answered Apr 11, 2023 Sahil_Lather comment Share Follow See 1 comment See all 1 1 comment reply Sahil_Lather commented Apr 11, 2023 reply Follow Share I think all combinations should be possible so none is wrong. 0 votes 0 votes Please log in or register to add a comment.