Question: How many times will the message Hello!n be displayed? int a = 0; int main() { int pid1= fork(); a++; int pid2= fork(); a++;
![]()
How many times will the message "Hello!n" be displayed? int a = 0; int main() { int pid1= fork(); a++; int pid2= fork(); a++; if (pid1 == || pid2=%30) { printf(Hello! "); } else { printf ("Goodbye! "); } a++; printf("a is %d ", a);
Step by Step Solution
3.26 Rating (152 Votes )
There are 3 Steps involved in it
3 times Hello will be printed Output Hello will be printed 3 times and Goodbye will be printed ... View full answer
Get step-by-step solutions from verified subject matter experts
