why we use c_str( )?
Solving a string challenge
it is use to convert string into character array
it is required because strtok() accepts only character array
char * strtok ( char * str, const char * delimiters );
but we r also typecasting it by using (char*)
eg - (char *)string.c_str()
this is because c_str() give const char* but we want char* so that why we type cast it
const char* c_str() const;