1.)String():-For creating an empty string
2.)String(Const char *str):-For creating a string object from a null terminated string
3.)String(const string &str):-For creating a string object from other string object
#include<iostream.h>
#include<string.h>
void main( )
{
char ch1[] = “Cplusplusexample”;
char ch22[80];
for(int i=0; i
ch2[i]=ch1[i];
ch2[i]=’\0’;
cout<< “The copied string is “<< ch2;
}
Output:-The copied string is Cplusplusexample