This is an opinion-based question (which I suppose is why it's been downvoted), so I'm going to wade in here with a dissenting opinion:
Why char and other C function should not be used in C++?
Well, it's partly because some people have rigid opinions on what programming should be, and they like to try to force these opinions on you. :-)
It's true that C has many unsafe aspects, particularly by modern standards. It's true that C++ has "better" or at least different ways of dealing with several things, including strings, I/O, and memory allocation.
But at the end of the day, programming languages are tools, and using them appropriately is always a balance between using them as designed, and getting your job done.
C++ was designed to be a superset of C. (These days it's not, of course, but the intent is still clearly there.) So there's nothing inherently wrong with using C features or idioms in a C++ program -- the whole point of Bjarne Stroustrup's exercise was always to allow you to.
If you choose to use a C feature in a C++ program, it might be an ignorant or a bad or a dangerous thing to do, or it might be expedient and decently appropriate thing to do. At the end of the day, it depends on whether it gets the job done, whether it's maintainable, and whether it's acceptable to any other people you may be sharing code or collaborating with.
For example, I code in both C and C++. And while I understand how cout
and <<
are a "better" way of doing output than C's printf
, I confess that I still use printf
in C++ programs a lot of the time, because it's so much more convenient. Despite its notorious and insurmountable warts and problems, printf
has always been one of my favorite parts of C, and I am loath to give it up.
I'm not saying you should use printf
in C++, or that you should ignore all the various benefits of std::string
, and new
/delete
, and the STL. "When in Rome, do as the Romans do" is a fine philosophy, and most of the time, you should use C++ idioms in C++. But if you have a good reason to fall back on a C idiom once in a while, I don't believe there's any shame in that, and I don't believe you should let anyone guilt-trip you into abandoning it just because they think it's "not proper".
[It will be interesting to see how violently this answer gets downvoted for its heretical advice. :-) ]