fork download
  1. #include <stdio.h>
  2.  
  3. void Modifica(char str[]){
  4. int i;
  5. chrstr[0]=chrstr[0]-'a'+'A';
  6. for(i=0;str[i]!='\0';i++){
  7. if(str[i]==' ')
  8. chrstr[i+1]=chrstr[i+1]-'a'+'A';
  9. }
  10. return;
  11. }
  12. int main(){
  13. char str[];
  14. printf("Frase: ");
  15. gets(str);
  16. Modifica(str);
  17. printf("Frase atualizada: ");
  18. puts(str);
  19. return 0;
  20.  
  21. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
ana carolina amim
compilation info
prog.c: In function ‘Modifica’:
prog.c:5:2: error: ‘chrstr’ undeclared (first use in this function)
  chrstr[0]=chrstr[0]-'a'+'A';
  ^~~~~~
prog.c:5:2: note: each undeclared identifier is reported only once for each function it appears in
prog.c: In function ‘main’:
prog.c:13:8: error: array size missing in ‘str’
   char str[];
        ^~~
prog.c:15:3: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration]
   gets(str);
   ^~~~
stdout
Standard output is empty