fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. bool my_global_array[1000];
  5.  
  6. void foo(bool *b)
  7. {
  8. b[0] = false;
  9. b[1] = true;
  10. }
  11.  
  12.  
  13. int main() {
  14. foo(my_global_array);
  15. cout << my_global_array[0] << "\n" << my_global_array[1];
  16. return 0;
  17. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
0
1