Hot Student Stories
top-5-grammar-and-spelling-checkers-to-rock-in-2019

Why scanf functions is not used to read a line of text?

Deborah Edwards

in Studying

follow
followin
1 answer
0 views

1 answer


Jeffrey Rodriguez on February 25, 2019

Because it is not safe. Scanf puts the data in a buffer. It is not the size of check of the data can be larger than the buffer causing a buffer overflow with undefined (usually bad, but always undesirable) behavior.


Add you answer