//合并两个字符串 用函数 还有判断有没有元音字母 用函数 用指针遍历!
#include<stdio.h>
#include<string.h>
char a[80]="abcdefg",b[20]="hijklmn";
void combine(void)
{
int i=0,j=0;
while(a[i]!='\0')
i++;
while(b[j]!='\0')
a[i++]=b[j++];
a[i]='\0';
printf("\nnew string:%s\n",a);
}
void vowel(void)
{
char i,j=0;
char vow[80];
for(i=0,j=0;a[i]!='\0';i++)
if(a[i]=='a'||a[i]=='A'||a[i]=='e'||a[i]=='E'||a[i]=='i'||a[i]=='I'||a[i]=='o'||a[i]=='O'||a[i]=='u'||a[i]=='U')
{vow[j]=a[i];
j++;
}
vow[j]='\0';
printf("the vowel letters are: %s\n",vow);
}
void main()
{
printf("the a string:%s\n",a[80]);
printf("the b string:%s\n",b[20]);
combine();
vowel();
}