Lab5 Strings
Lab5 Strings
#include<string.h>
int main()
// cout<<"length= "<<strlen(str1);
char str2[max];
str2[i]=str1[i];
str2[50]='\0';
cout<<endl;
cout<<str2<<endl;
//........................................
strcpy(me, "YouAreNotMe");
// .........................................
cout<<"___________________________________________"<<endl;
char one[10];
one[9] = '\0';
strcpy(one, str5);
// ....................................................
cout<<"_____________________________________"<<endl;
char str6[30];
strcpy(str6, "abc");
strcat(str6, "def");
strcat(str6, str7);
str6[4] = '\0';
cout<<"_____________________________________________"<<endl;
char str8[30];
strcpy(str8, "abc");
str8[5] = '\0';
strcat(str8, str9);
str8[4] = '\0';
// .........................................................
cout<<"_____________________________________________"<<endl;
// ..........................................................
char str11[20];
cout<<strcpy(str11,"mis")<<endl;
cout<<str11;