i tried but it did not work.....please help me
#include <iostream.h>
#include <conio.h>
int length_str(char word[]);
char cat_str(char word1[], char word2[]);
void main()
{
clrscr();
char word[50],word1[50],word2[50];
int choice,z,y;
do{clrscr();
cout<<"\t\tSELECT YOUR CHOICES"
<<"\n\t [1] - tells number of characters the string has"
<<"\n\t [2] - Concatenation of string"
<<"\n\t [3] - Exit"
<<endl;
cin>>choice;
clrscr();
switch(choice)
{
case 1: cout<<"Enter a word: ";
cin>>word;
z=length_str(word);
cout<<"The no. of characters the string has is: "<<z;
getch();
break;
case 2: cout<<"Enter 1st word: ";
cin>>word1;
cout<<"Enter 2nd word: ";
cin>>word2;
y=cat_str(word1,word2);
cout<<"the concatenation word is: "<<y;
getch
break;
case 3: cout<<"EXIT";
getch
break;
}
}while(choice == 1 || choice == 2);
}
int length_str(char word[])
{
int i=0;
for(int j=0;word[j]!='\0';j++)
i++;
return i;
}
char cat_str(char word1[], char word2[])
{ char word3[100];
int i=0,hold;
hold=for(int j=0;word1[j]!='\0';j++)
for(int j=0;word2[j]!='\0';j++)
word1[hold++]=word2[i];
return y;
}