I'm new with C++ and I'v write this program:
#include <iostream>
#include <string>
using namespace std;
void main() {
char s[2] = { 'a', 'l' };
cout << s << endl;
}
And when I run this code I get wrong output like this:
al╠╠╠╠╠╠H²O
Why? because when I learn C++ I'v read when I print characters array I will see array elements like string.