Can you tell me what was the problem, please? I also do programming in C++, but seems like in every task when I use string (ex. char a[100]), I get wrong result.
for C strings: if you need N characters then you should allocate at least N+1 bytes of memory. and cin/cout are from c++, not from c, so you can't read C string with cin ( i think ). you can read it with