New course! Every coder should learn Generative AI!
Try a free lesson+ 1
How gets() function works?
2 Answers
+ 1
The C library function char *gets(char *str) reads a line from stdin and stores it into the string pointed to by str
+ 1
Also, in general you shouldn't be using it. Use fgets, or, if available, gets_s.