fork download
  1. #include <stdio.h>
  2.  
  3. void func1(void) , func2(void);
  4.  
  5. int count; /* count является глобальной переменной */
  6.  
  7. int main(void)
  8. {
  9. count = 100;
  10. func1 ();
  11. return 0; /* сообщение об удачном завершении работы */
  12. }
  13.  
  14. void func1 (void)
  15. {
  16. func2 ();
  17. printf("счетчик %d", count); /* выведет 100 */
  18. }
  19.  
  20. void func2(void)
  21. {
  22. int count;
  23. for(count=1; count<10; count++)
  24. putchar(' ');
  25. }
  26.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
         счетчик 100