+ 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

20th Jul 2020, 12:05 PM
Usha Sri
Usha Sri - avatar
2 Antworten
+ 2
It's running, just showing warnings that brainless me can't fix.
20th Jul 2020, 12:10 PM
PresidentOfYes12
PresidentOfYes12 - avatar
+ 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/
20th Jul 2020, 12:20 PM
Vasile Eftodii
Vasile Eftodii - avatar