#include <bits/stdc++.h>
using namespace std;
int main()
{
string s1 = "Alice";
s1 +='\0';
s1 +='\0';
cout << s1.size() << endl; // output: 7
string s2 = "Alice";
s2 += "\0";
s2 += "\0";
cout << s2.size() << endl; // output: 5
}
What is wrong here?
Please explain the difference between role of single quotes and double quotes in concatenation.