When I declare a char array of length 2 and then input a string of length greater than 2, it doesn't give an error and outputs the whole string. Does that mean extra size is allocated dynamically?
Sample code:
char arr[2];
cin >> arr;
cout << arr << endl;
Input = "Hey"
Output = "Hey"