fork(5) download
  1. #include <stdio.h>
  2.  
  3.  
  4.  
  5. int arr[] = { 10, 20, 30, 40, 50 };
  6.  
  7. static int count ;
  8.  
  9. inc() {
  10.  
  11. return ++count;
  12.  
  13. }
  14.  
  15. int main()
  16.  
  17. {
  18.  
  19. arr[count++]=inc();
  20.  
  21. printf("%d ", arr[count]);
  22.  
  23. printf("%d ", arr[0]);
  24.  
  25. }
  26.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
30 2