/**
* String is same as char type array of C language.
* But there are several build in functions in String
* Thus, we can use it more fairly then char array.
* Remember, we can't take String input using scanf.
* Rather, we need to use "cin".
*/
#include<stdio.h>
#include<string.h>
#include<string>
#include<iostream>
using namespace std;
int main()
{
char st[]="This not a good code";
string str="Good line";
cout << str << " and -> " << st <<endl; // in printf str.c_str()
puts("Give a line");
cin >> str; // no other way to take input
cout << str << endl;
printf(" The lenght is %d and first char %c\n", str.length () , str[0] );
str.insert(0, st );
cout << str << endl;
str.erase();
return 0;
}