Posts by Isadora • 11 points
2 posts
-
0
votes2
answers157
viewsA: Calculate the number of characters of the largest word in a file
I figured it out, stay there for whoever: int main (void) { char str[64]; scanf ("%64s", str); FILE *f = fopen ("scores.txt", "r"); if (!f) { fprintf (stderr, "ERRO"); return 1; } char c; int n = 0,…
-
1
votes2
answers157
viewsQ: Calculate the number of characters of the largest word in a file
The file is written as follows: palavra0palavra0palavra0 Since the words are different. The problem is to calculate the size of the largest word that appears between the zeroes, and the file can…