I would highly recommend using std::string, [it's much safer]
[Why] C and not [C++]?
[C++ nit-picking]
"Why are you using C strings in your C program? You should use C++ strings in a C++ program instead." Ugh. OP is learning C, not C++.[C++ nit-picking]
How about we suggest that he use Java instead? Java is far safer than C++, because exceptions, virtual environment, and other fun stuff.
/rant
Shogun.