Output is:
с
а
й
н
So according the output, I think one mongolian cyrillic char size is 2 bytes.
But when I try this code, there is an error "Initializer string for array is too long".
char a[2]="й";
So does it mean that size of mongolian cyrillic char is not 2 bytes?
Prepending L you would have to work with wide characters wchar_t. You can have unicode with char if you use an encoding like UTF-8. If strings are UTF-8 encoded by default is implementation defined. In C++11 you can tell the string to be UTF-8 encoded by prepending u8. u8"сайн"
does it mean that size of mongolian cyrillic char is not 2 bytes?
The size of a char is always one byte. But, when you use non-ASCII characters in a string literal (between quotes), in a program, something else is stored.
In your case, it sounds like you're using something like linux, so you're getting UTF-8, where each of these characters indeed happens to be encoded by a two-byte sequence: