0
When we use gets() in C language then what does the compiler read whenever there comes a space? Ex : This " " is " " me.
This is related to C programming language. Your help is most appreciated đ
3 Answers
+ 4
i would not recommend using gets(). it is deprecated and insecure, if input is larger than string it overruns the buffer.
Use fgets(s, sizeof(s), stdin) instead. fgets() also stops at newlines or EOF. Only difference is fgets() adds the newline to the string.
+ 2
It reads it as a space and does not terminate unlike scanf(). You can write a code and run it on code playground to check the same.