added small notation on difference between scanf and gets in c programming
This commit is contained in:
parent
aee830a2c3
commit
4b8692f830
1 changed files with 6 additions and 0 deletions
6
c_difference_between_scanf_and_gets.txt
Normal file
6
c_difference_between_scanf_and_gets.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
https://www.geeksforgeeks.org/difference-between-scanf-and-gets-in-c/
|
||||
|
||||
The main difference between them is:
|
||||
|
||||
scanf() reads input until it encounters whitespace, newline or End Of File(EOF) whereas gets() reads input until it encounters newline or End Of File(EOF), gets() does not stop reading input when it encounters whitespace instead it takes whitespace as a string.
|
||||
scanf can read multiple values of different data types whereas gets() will only get character string data.
|
||||
Loading…
Add table
Add a link
Reference in a new issue