Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int *x = malloc (sizeof (int));
- *x = 2;
- switch (fork ()) {
- case -1:
- exit (1);
- case 0:
- *x += 42;
- break;
- default:
- wait ();
- *x += 10;
- break;
- }
- printf ("%d ", *x);
- free (x);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement