#include <iostream>
#include <string>
using namespace std; 
int main() {
    char s1[10]="hello";
    char s2[10]="world";
    char s3[10];
    int len, n; 
    cout <<"Enter the number to perform task";
    cin>>n; 
    switch (n)
    {
    case 1:
    strcpy (s3,s1);
    cout <<"strcpy (s1,s3)"<<s3<<endl; 
    break; 
    
    case 2:
    strcat (s1,s2);
    cout <<"strcat (s1,s2)"<<s1<<endl; 
    break; 
    case 3:
    len=strlen(s1);
    cout <<"strlen(s1) :"<<len<<endl; 
    break 
    }
    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: