Să se scrie un program care citește un cuvânt și îl afișează după interschimbarea primei vocale cu ultima consoană.
Problema | InterschimbareLitere | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51525174 | Utilizator | |
Fișier | interschimbarelitere.c | Dimensiune | 881 B |
Data încărcării | 04 Iulie 2024, 17:08 | Scor / rezultat | 0 puncte |
interschimbarelitere.c:4:6: warning: return type of 'main' is not 'int' [-Wmain] void main() ^ interschimbarelitere.c: In function 'main': interschimbarelitere.c:9:2: warning: passing argument 1 of 'fgets' from incompatible pointer type [enabled by default] fgets(stdin,sir,20); ^ In file included from /usr/include/stdio.h:937:0, from interschimbarelitere.c:2: /usr/include/i386-linux-gnu/bits/stdio2.h:253:1: note: expected 'char * restrict' but argument is of type 'struct _IO_FILE *' fgets (char *__restrict __s, int __n, FILE *__restrict __stream) ^ interschimbarelitere.c:9:2: warning: passing argument 2 of 'fgets' makes integer from pointer without a cast [enabled by default] fgets(stdin,sir,20); ^ In file included from /usr/include/stdio.h:937:0, from interschimbarelitere.c:2: /usr/include/i386-linux-gnu/bits/stdio2.h:253:1: note: expected 'int' but argument is of type 'char *' fgets (char *__restrict __s, int __n, FILE *__restrict __stream) ^ interschimbarelitere.c:9:2: warning: passing argument 3 of 'fgets' makes pointer from integer without a cast [enabled by default] fgets(stdin,sir,20); ^ In file included from /usr/include/stdio.h:937:0, from interschimbarelitere.c:2: /usr/include/i386-linux-gnu/bits/stdio2.h:253:1: note: expected 'struct FILE * restrict' but argument is of type 'int' fgets (char *__restrict __s, int __n, FILE *__restrict __stream) ^ interschimbarelitere.c:10:2: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] for (i = 0; i < strlen(sir); i++) { ^ interschimbarelitere.c:10:18: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default] for (i = 0; i < strlen(sir); i++) { ^ interschimbarelitere.c:11:3: warning: implicit declaration of function 'strchr' [-Wimplicit-function-declaration] if (strchr("aeiouAEIOU", sir[i]) && ok==1) { ^ interschimbarelitere.c:11:7: warning: incompatible implicit declaration of built-in function 'strchr' [enabled by default] if (strchr("aeiouAEIOU", sir[i]) && ok==1) { ^ interschimbarelitere.c:18:11: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default] for (i = strlen(sir) - 1; i >= 0; i--) { ^ interschimbarelitere.c:19:8: warning: incompatible implicit declaration of built-in function 'strchr' [enabled by default] if (!strchr("aeiouAEIOU", sir[i]) && ok==1) { ^ interschimbarelitere.c:27:19: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default] for (i = 0; i < strlen(sir); i++) { ^ interschimbarelitere.c:28:8: warning: incompatible implicit declaration of built-in function 'strchr' [enabled by default] if (strchr("aeiouAEIOU", sir[i]) && ok == 1) { ^ interschimbarelitere.c:34:12: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default] for (i = strlen(sir) - 1; i >= 0; i--) { ^ interschimbarelitere.c:35:9: warning: incompatible implicit declaration of built-in function 'strchr' [enabled by default] if (!strchr("aeiouAEIOU", sir[i]) && ok == 1) { ^ interschimbarelitere.c:40:19: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default] for (i = 0; i < strlen(sir); i++) { ^ interschimbarelitere.c:9:7: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result [-Wunused-result] fgets(stdin,sir,20); ^ interschimbarelitere.c:29:12: warning: 'c' may be used uninitialized in this function [-Wmaybe-uninitialized] sir[i] = c; ^ interschimbarelitere.c:36:12: warning: 'v' may be used uninitialized in this function [-Wmaybe-uninitialized] sir[i] = v; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 30 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 30 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 30 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema InterschimbareLitere 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ă.