Să se verifice dacă o propoziție dată este palindromică.
Problema | PalindromPropozitie | Operații I/O |
![]() palindrom.in /palindrom.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58542249 | Utilizator | |
Fișier | palindrompropozitie.c | Dimensiune | 1.16 KB |
Data încărcării | 16 Iunie 2025, 13:05 | Scor / rezultat | Eroare de compilare |
palindrompropozitie.c: In function 'main': palindrompropozitie.c:8:5: error: invalid initializer FILE fin = fopen("palindrom.in", "r"); ^ palindrompropozitie.c:9:5: error: 'FILEfout' undeclared (first use in this function) FILEfout = fopen("palindrom.out", "w"); ^ palindrompropozitie.c:9:5: note: each undeclared identifier is reported only once for each function it appears in palindrompropozitie.c:11:13: error: invalid operands to binary == (have 'FILE' and 'void *') if (fin == NULL || fout == NULL) { ^ palindrompropozitie.c:11:24: error: 'fout' undeclared (first use in this function) if (fin == NULL || fout == NULL) { ^ palindrompropozitie.c:20:5: error: incompatible type for argument 3 of 'fgets' fgets(dummy, 201, fin); // Citește linia cu numărul n ^ In file included from /usr/include/stdio.h:937:0, from palindrompropozitie.c:1: /usr/include/i386-linux-gnu/bits/stdio2.h:253:1: note: expected 'struct FILE * restrict' but argument is of type 'FILE' fgets (char *__restrict __s, int __n, FILE *__restrict __stream) ^ palindrompropozitie.c:24:9: error: incompatible type for argument 3 of 'fgets' fgets(s, 201, fin); ^ In file included from /usr/include/stdio.h:937:0, from palindrompropozitie.c:1: /usr/include/i386-linux-gnu/bits/stdio2.h:253:1: note: expected 'struct FILE * restrict' but argument is of type 'FILE' fgets (char *__restrict __s, int __n, FILE *__restrict __stream) ^ palindrompropozitie.c:48:5: error: incompatible type for argument 1 of 'fclose' fclose(fin); ^ In file included from palindrompropozitie.c:1:0: /usr/include/stdio.h:237:12: note: expected 'struct FILE *' but argument is of type 'FILE' extern int fclose (FILE *__stream); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PalindromPropozitie face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.