源代码如下(vc++6.0下编译通过):#include <stdio.h>#include <string.h>#define MAX_SENTENCE_STR_LEN 1024int main(){char English_sentence[MAX_SENTENCE_STR_LEN] = {0};char word[32] = {0};char *token = NULL;char *seps = ” “;printf(“please input a English sentence: \n”);gets(English_sentence);token = strtok(English_sentence, seps);while (token != NULL){strcpy(word, token);if (word[0] >= ‘A’ && word[0] <= ‘Z’){printf(“%s\n”, word);}token = strtok(NULL, seps);}return 0;}希望对你有帮助。
200字范文,内容丰富有趣,生活中的好帮手!