#include <cstdlib>
#include <iostream>
#include <string.h>
using namespace std;
int main(int argc, char *argv[])
{
int i;
char s1[] = "ABCDEFG";
char s2[] = "XYZ";
cout<<"sebelum strcat (s1,s2) : \n";
cout<<"\ts1 = ["<<s1<<"], panjang = "<<strlen(s1)<<endl;
cout<<"\ts1 = ["<<s2<<"], panjang = "<<strlen(s2)<<endl;
strcat (s1,s2);
cout<<"setelah strcat (s1,s2) :\n";
cout<<"\ts1 = ["<<s1<<"], panjang = "<<strlen(s1)<<endl;
cout<<"\ts1 = ["<<s2<<"], panjang = "<<strlen(s2)<<endl;
cin>> i;
system("PAUSE");
return EXIT_SUCCESS;
}
out put program
0 comments:
Posting Komentar