Hi!
I would greatly appreciate all the help i can get with figuring out the output of the following control flow program! Thanks a bunch! :)
#include "csapp.h"
int counter = 1;
int main()
{
if (fork() == 0)
{
counter--;
exit(0);
}
else
{
Wait(NULL);
printf("counter = %d\n", ++counter);
}
exit(0);
}
Start Free Trial