+ 1
Gets puts
#include <stdio.h> int main() { char a[100]; gets(a); printf("You entered: "); puts(a); return 0; } Can anyone help me with this. The output Displaying error
2 Antworten
+ 2
It's running, just showing warnings that brainless me can't fix.
+ 2
"gets()" is a deprecated function! Use "fgets()" instead:
fgets(a, 100, stdin);
http://www.cplusplus.com/reference/cstdio/gets/
http://www.cplusplus.com/reference/cstdio/fgets/