#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define N 32 //关键字数量
#define M 50 //输入的句子中的字符数
#define LEN 10 //每个单词的最大长度
int InputWord(char s[][LEN]);
void OutputCountResults(char *keywords[] , int count[], int n);
int IsKeyword(char s[]);
void CountKeywords(char s[][LEN], int n);
int main(void)
{
//=======begin=======
//========end========
}
//函数功能:以空格符作为分隔符输入包含多个单词的字符序列,切分单词并保存到二维字符数组
int InputWord(char word[][LEN])
{
//=======begin=======
//========end========
}
//函数功能:输出关键字统计结果
void OutputCountResults(char *keywords[], int count[], int n)
{
//=======begin=======
//========end========
}
//函数功能:判断s是否是C语言关键字,若是,则返回其下标,否则返回-1
int IsKeyword(char s[])
{
char *keywords[N] = {"auto", "break", "case", "char", "const",
"continue", "default", "do", "double","else",
"enum", "extern", "float", "for", "goto",
"if", "int", "long", "register", "return",
"short", "singed", "sizeof", "static",
"struct", "switch", "typedef", "union",
"unsigned", "void", "volatile", "while"
}; //字符指针数组构造关键字词典
//=======begin=======
//========end========
}
//函数功能:统计二维字符数组s中关键字的数量存于结构体数组keywords的count成员中
void CountKeywords(char s[][LEN], int n)
{
char *keywords[N] = {"auto", "break", "case", "char", "const",
"continue", "default", "do", "double","else",
"enum", "extern", "float", "for", "goto",
"if", "int", "long", "register", "return",
"short", "singed", "sizeof", "static",
"struct", "switch", "typedef", "union",
"unsigned", "void", "volatile", "while"
}; //字符指针数组构造关键字词典
//=======begin=======
//========end========
}