fork download
  1. #include <stdio.h>
  2. #define MAX 500
  3.  
  4. int main() {
  5. char text [MAX+1];
  6.  
  7. printf("Informe o texto (tamanho maximo %d caracteres:", MAX);
  8. gets(text);
  9. text[0] = '*';
  10. for (int i = 0; i <= MAX; i++) {
  11. if (text[i] == ' ') {
  12. text[i + 1] = '*';
  13. }
  14. }
  15. printf("\nO texto final e %s\n", text);
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function 'main':
prog.c:8:5: error: 'gets' is deprecated [-Werror=deprecated-declarations]
     gets(text);
     ^
In file included from prog.c:1:0:
/usr/include/stdio.h:638:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^
cc1: all warnings being treated as errors
stdout
Standard output is empty