My colleague sometimes gives me a C++ quiz. This is one of such quiz by Peter. What is the output of the following C++ program.
std::string prefix("->"), middle(), postfix("<-");
std::cout << "Hi:" << prefix << middle << postfix << std::endl;
The result is the following.
There is '1' in the middle. Why this happens? Before I give you the
explanation, I will give you some time. Enjoy! To be continued.