#include <iostream>
using namespace std;
int main() {
// your code goes here
string g = "12345";
cout << g[10] << endl; // Prints an empty character
return 0;
}
Reference: https://ideone.com/rpCWm2
This surprisingly works and doesn't throw an error! Can somebody explain how this is happening? Thank you!