fork download
#include <stdio.h>
#define MAX 500

int main() {
    char text [MAX+1];

    printf("Informe o texto (tamanho maximo %d caracteres:", MAX);
    gets(text);
    text[0] = '*';
    for (int i = 0; i <= MAX; i++) {
        if (text[i] == ' ') {
            text[i + 1] = '*';
        }
    }
    printf("\nO texto final e %s\n", text);
}
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