5 Answers
5

char* is just a pointer to a single char. In C and C++, various functions exist that will take a pointer to a single char as a parameter and will track along the memory until a 0 memory value is reached (often called the null terminator). In that way it models a string of characters; strlen is an example of a function (from the C standard library) that does this.

If you have a choice, use std::string as you don't have to concern yourself with memory.

Its simple, char *a; declares a pointer 'a' of type char,it will point to a constant string or character arrays. String b; declares b as an object of string type.String here is a class which contains several string manipulation member functions(methods).You can look here for further details:http://www.cplusplus.com/reference/string/string/

One example program describing the string object and its member function is given below: