#include using namespace std; int main() { char ch[5]; cin>>ch; cout<<ch; return 0; }
it depend on machine you are using if that extra memory is not given to anyone else it print whole string but if it is allocated to someone else it give segmentation fault
in my case it is giving segmentation fault