#2693
VocSortDesc
Se dă un șir de caractere în care cuvintele sunt formate din litere mici și mari ale alfabetului englez și sunt separate prin spații. Să se afișeze cuvintele în ordine descrescătoare după numărul de vocale și să se afișeze fiecare cuvânt pe câte o linie. Dacă două cuvinte au același număr de vocale atunci ele se vor ordona descrescător după lungime, iar dacă au aceeași lungime atunci se vor ordona lexicografic.
Problema | VocSortDesc | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #29270661 | Utilizator | |
Fișier | vocsortdesc.c | Dimensiune | 1.16 KB |
Data încărcării | 13 Aprilie 2021, 17:02 | Scor / rezultat | 0 puncte |
vocsortdesc.c: In function 'main': vocsortdesc.c:9:5: warning: 'gets' is deprecated (declared at /usr/include/i386-linux-gnu/bits/stdio2.h:233) [-Wdeprecated-declarations] gets(s); ^ vocsortdesc.c:10:5: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] int n=strlen(s),k=0; ^ vocsortdesc.c:10:11: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default] int n=strlen(s),k=0; ^ vocsortdesc.c:11:5: warning: implicit declaration of function 'strtok' [-Wimplicit-function-declaration] token=strtok(s," "); ^ vocsortdesc.c:11:10: warning: assignment makes pointer from integer without a cast [enabled by default] token=strtok(s," "); ^ vocsortdesc.c:14:9: warning: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration] strcpy(a[k],token); ^ vocsortdesc.c:14:9: warning: incompatible implicit declaration of built-in function 'strcpy' [enabled by default] vocsortdesc.c:16:14: warning: assignment makes pointer from integer without a cast [enabled by default] token=strtok(NULL," "); ^ vocsortdesc.c:23:13: warning: implicit declaration of function 'strchr' [-Wimplicit-function-declaration] if(strchr(v,a[i][j])) ^ vocsortdesc.c:23:16: warning: incompatible implicit declaration of built-in function 'strchr' [enabled by default] if(strchr(v,a[i][j])) ^ vocsortdesc.c:40:17: warning: incompatible implicit declaration of built-in function 'strcpy' [enabled by default] strcpy(aux2,a[i]); ^ vocsortdesc.c:10:9: warning: unused variable 'n' [-Wunused-variable] int n=strlen(s),k=0; ^ vocsortdesc.c:9:9: warning: ignoring return value of 'gets', declared with attribute warn_unused_result [-Wunused-result] gets(s); ^ /tmp/ccE6UOZG.o: In function \`main': vocsortdesc.c:(.text.startup+0x6f): warning: the \`gets' function is dangerous and should not be used.
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema VocSortDesc 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ă.