13_5在所给的10个单词中找出不包含元音字母(a,e,i,o,u)的单词,将符合条件的单词的个数以及这些单词
(2012-05-17 10:39:41)
标签:
教育 |
分类: C |
13_5在所给的10个单词中找出不包含元音字母(a,e,i,o,u)的单词,将符合条件的单词的个数以及这些单词按照字典顺序输出。
⑴ 编写函数int FindNoVowel(char *str[],int num,char res[ ][20]),str指向的指针数组中保存若干单词字符串的首地址,num保存单词的个数,res指向的数组保存找到的符合条件的单词字符串,每行存放一个单词,要求将符合条件的单词按字典顺序存储,函数返回符合条件的单词个数。
⑵
编写main()函数,声明数组并用测试数据初始化数组,调用函数FindNoVowel,将符合条件的所有单词按字典顺序输出,单词之间用空格隔开。
测试数据,10个字符串为:
"ftp","qq","msn","internet","web","google","bbs","mp3","blog","ibm"
运行结果:
bbs
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<ctype.h>
int FindNoVowel(char *str[],int num,char res[][20]);
int Novowel(char *s);
void sort(char s[][20],int n);
int main(void)
{
*s[10]={"ftp","qq","msn","internet","web","google","bbs","mp3","blog","ibm"};
}
int FindNoVowel(char *str[],int num,char res[][20])
{
}
int Novowel(char *s)
{
}
void sort(char s[][20],int n)
{
}