fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6.  
  7.  
  8. char c[][100] = { "ritwik" , "rishabh"};
  9.  
  10. cin.getline(c[2],100);
  11.  
  12. cout << c[0] << endl;
  13. cout << c[1] << endl;
  14. cout << c[2] << endl;
  15.  
  16.  
  17. return 0;
  18. }
Runtime error #stdin #stdout #stderr 0s 4416KB
stdin
amazon is a good company.
stdout
ritwik
rishabh
amazon is a good company.
stderr
*** stack smashing detected ***: <unknown> terminated