Facebook
From filip, 6 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 264
  1. #include <stdio.h>
  2. #include <unistd.h>
  3.  
  4. int main()
  5. {
  6.  
  7. int pid;
  8. float a, b, c;
  9.  
  10. pid = fork();
  11.  
  12. if (pid == 0)
  13. a=1+1;
  14.  
  15. else wait();
  16. b=2+2;
  17.  
  18. c=a+b;
  19. printf("c=%f\n", c);
  20.  
  21. return 0;
  22.  
  23. }