fork(2) download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. int main() {
  6. try{
  7. std::vector<int> arr;
  8. int val = arr[-1];
  9. std::cout << "successful";
  10. // your code goes here
  11. return 0;
  12. }catch(...)
  13. {
  14. std::cout << "exeption";
  15. }
  16. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
successful