char a[] = {‘a’, ‘b’, ‘c’};
string s5(a);
cout << s5;
When i did not put ‘\0’ character at the end of character array ,put a into the string and then printed the string, the output was - abc��a .
What did actually happen which led to the above result?
(if there was not a ‘\0’ then the string should have continued as it does not know the end or if it does then the output should have been - abc)