#973
Cuvinte1
Se dă o propoziție care conține numai litere mici ale alfabetului englez și spații. Să se afișeze cuvintele din propoziție care conțin numai vocale.
Problema | Cuvinte1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #34621960 | Utilizator | |
Fișier | cuvinte1.c | Dimensiune | 278 B |
Data încărcării | 08 Februarie 2022, 10:04 | Scor / rezultat | Eroare de compilare |
cuvinte1.c: In function 'main': cuvinte1.c:6:5: warning: 'gets' is deprecated (declared at /usr/include/i386-linux-gnu/bits/stdio2.h:233) [-Wdeprecated-declarations] gets(s); ^ cuvinte1.c:9:33: warning: character constant too long for its type [enabled by default] if((strchr('aeiou', s[i]) && (strchr('aeiou', s[i+1])) ^ cuvinte1.c:9:33: warning: character constant too long for its type [enabled by default] cuvinte1.c:9:9: warning: passing argument 1 of '__rawmemchr' makes pointer from integer without a cast [enabled by default] if((strchr('aeiou', s[i]) && (strchr('aeiou', s[i+1])) ^ In file included from /usr/include/string.h:635:0, from cuvinte1.c:2: /usr/include/i386-linux-gnu/bits/string2.h:393:14: note: expected 'const void *' but argument is of type 'int' extern void *__rawmemchr (const void *__s, int __c); ^ cuvinte1.c:9:33: warning: character constant too long for its type [enabled by default] if((strchr('aeiou', s[i]) && (strchr('aeiou', s[i+1])) ^ cuvinte1.c:9:9: warning: passing argument 1 of '__builtin_strchr' makes pointer from integer without a cast [enabled by default] if((strchr('aeiou', s[i]) && (strchr('aeiou', s[i+1])) ^ cuvinte1.c:9:9: note: expected 'const char *' but argument is of type 'int' cuvinte1.c:9:61: warning: character constant too long for its type [enabled by default] if((strchr('aeiou', s[i]) && (strchr('aeiou', s[i+1])) ^ cuvinte1.c:9:61: warning: character constant too long for its type [enabled by default] cuvinte1.c:9:9: warning: passing argument 1 of '__rawmemchr' makes pointer from integer without a cast [enabled by default] if((strchr('aeiou', s[i]) && (strchr('aeiou', s[i+1])) ^ In file included from /usr/include/string.h:635:0, from cuvinte1.c:2: /usr/include/i386-linux-gnu/bits/string2.h:393:14: note: expected 'const void *' but argument is of type 'int' extern void *__rawmemchr (const void *__s, int __c); ^ cuvinte1.c:9:61: warning: character constant too long for its type [enabled by default] if((strchr('aeiou', s[i]) && (strchr('aeiou', s[i+1])) ^ cuvinte1.c:9:9: warning: passing argument 1 of '__builtin_strchr' makes pointer from integer without a cast [enabled by default] if((strchr('aeiou', s[i]) && (strchr('aeiou', s[i+1])) ^ cuvinte1.c:9:9: note: expected 'const char *' but argument is of type 'int' cuvinte1.c:10:13: error: expected ')' before 'printf' printf("%c %c", s[i], s[i+1]); ^ cuvinte1.c:11:5: error: expected ')' before '}' token } ^ cuvinte1.c:11:5: error: expected expression before '}' token cuvinte1.c:6:9: warning: ignoring return value of 'gets', declared with attribute warn_unused_result [-Wunused-result] gets(s); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cuvinte1 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ă.