fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int *vernutMassiv(int a, int be, int ce)
  5. {
  6. static int massiv[] = {a, be, ce};
  7. return massiv;
  8. }
  9.  
  10. int main() {
  11. int* massiv1 = vernutMassiv(1,2,3);
  12. int* massiv2 = vernutMassiv(2,3,4);
  13. int* massiv3 = vernutMassiv(3,4,5);
  14.  
  15. cout << massiv1[0];
  16. cout << massiv2[0];
  17. cout << massiv3[0];
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
111