#include<iostream.h>
#include<string.h>
#include<conio.h>
void main()
{
                char str[20];
                clrscr();
                cout<<"Enter A String : ";
                cin.getline(str,20);
                cout<<"\tThe String is : \n"<<str<<endl;
                cout.write(str,strlen(str))<<endl;
                cout.write(str,20)<<endl;
                getch();
}

120.PNG

Advertisements