Por que obtenho esse erro na compilação, embora eu consigo executá-lo normalmente;
Código:
#include <stdio.h>
#include <stdlib.h>
int main() {
char nomeCompleto[20];
printf("Qual o seu nome: ");
gets(nomeCompleto);
printf("Seu nome é: %s\n", nomeCompleto);
return 0;
}
Erro na compilação:
spli.c: In function ‘main’:
spli.c:8:2: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets(nomeCompleto);
^
/tmp/ccLaJxGc.o: na função `main':
spli.c:(.text+0x29): aviso: the `gets' function is dangerous and should not be used.