Compare commits

...

16 Commits

Author SHA1 Message Date
maxgrf
a78c1e2ea2 testphrases deleted + all test for input passed 2025-11-07 17:25:34 +01:00
maxgrf
c18b6a4529 test12! 2025-11-07 17:17:54 +01:00
maxgrf
013eba7b3d test13 2025-11-06 16:44:13 +01:00
maxgrf
cd3dd0a4d6 test12 2025-11-06 16:43:06 +01:00
maxgrf
b9138e2097 test11 2025-11-06 16:41:45 +01:00
maxgrf
28a2aa1ea1 test10 2025-11-06 16:35:30 +01:00
maxgrf
cddbfb3029 test9 2025-11-06 16:23:36 +01:00
maxgrf
5c1aea7a88 test8 2025-11-06 16:18:53 +01:00
maxgrf
f47f3aef7c test7 2025-11-06 16:17:55 +01:00
maxgrf
b34074233d test5 2025-11-06 16:15:25 +01:00
maxgrf
bbad6afd45 test4 2025-11-06 16:12:26 +01:00
maxgrf
9e172b664f update 2025-11-06 15:59:21 +01:00
maxgrf
c26a55f965 endloschleife2 2025-11-06 15:50:21 +01:00
maxgrf
16b0b9a450 endlosschleife behoben 2025-11-06 15:43:10 +01:00
maxgrf
85a79e9235 test2 2025-11-06 15:35:37 +01:00
maxgrf
506c091bf6 test1 2025-11-06 15:31:01 +01:00
7 changed files with 11 additions and 8 deletions

Binary file not shown.

Binary file not shown.

View File

@ -8,7 +8,6 @@
// Read words from file and store in 'words' array
int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
{
char puffer[MAX_LINE_LEN]; //Array für eingelesene Zeile
int counter = 0; //Zähler für Anzahl eingelesener Wörter
int i;
@ -19,14 +18,18 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
while(word_parts != NULL && counter < maxWordCount)
{
for(i = 0; i < MAX_WORD_LEN -1 && word_parts[i] != '\0'; i++)
{
words[counter][i] = toupper(word_parts[i]); //Großbuchstaben erzeugen
}
words[counter][i] = '\0'; //Stringdefinition vervollständigen
// Kopiere das Wort in words-Array
strncpy(words[counter], word_parts, MAX_WORD_LEN - 1);
words[counter][MAX_WORD_LEN - 1] = '\0';
// Alles in Großbuchstaben umwandeln
for(i = 0; words[counter][i] != '\0'; i++)
{
words[counter][i] = toupper(words[counter][i]);
}
counter++; // Wort eingelesen, Wortzähler erhöhen
word_parts = strtok(NULL, ",;\n\t/. "); //NULL für Zeiger angeben
}
counter++; // Wort eingelesen, Wortzähler erhöhen
word_parts = strtok(NULL, ",;\n\t/. "); //NULL für Zeiger angeben
}
return counter;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.