hi, i just want the join two strings by checking the second string a non vowel word.
suppose,
str1="hello";
str2="world";
here i want the neglect the vowel characters in the second string.
so, i have used 'while loop' for checking each character in the str2.
i used the code something like this,
void main()
{
char *str1="hello";
char *str2="world";
char *s;
clrscr();
while(*str2)
{
*s=*str2;
strcat(str1,s);
*str2++;
}
printf("%s",str1);
getch();
}
required output:hellowrld.(after omitting the vowel character 'o' in str2).
here i didnt check the vowels, but he problem is
i am getting some junk values in the loop.
can anyone tell me what is the mistake. or what is the right way to do this.