#include<iostream.h>
#include<conio.h>
#include<string.h>
char str2[10];
void main()
{
                char str1[10];
                int i;
                clrscr();
                cout<<"Enter A String : ";
                cin>>str1;
                for(i=0;i<strlen(str1);i++)
                                {
                                str2[i]=str1[i];
                                }
                cout<<"\nThe Value Inside Str1 = "<<str1<<" And Inside Str2 = "<<str2;
                getch();
}

129.PNG

Advertisements