i need to read strings from file in C, and that's work, now i need to find in each string the words that start with a capital letter. Any input?
Example: 1) Windows is a good OS 2) Linux is Open Source
Words with capital letter: Windows, OS, Linux, Open, Source.
#include <stdio.h>
int main()
{
/* dichiarazioni variabili */
FILE *fp;
char vet1[100];
char vet2[100];
fp = fopen("file.txt", "r"); /* apro il file contenente la stringa */
if (fp == NULL) {
printf("\nIl file non esiste!\n");
}
while (!feof(fp)) {
fgets(vet1, 100, fp);
printf("%s\n", vet1);
}
fclose(fp);
}