Difference between scanf and gets,getchar | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

Difference between scanf and gets,getchar

2nd Jul 2019, 11:41 AM
Shreya Devkar
3 Respuestas
+ 3
you post this twice, pleas delete this one
2nd Jul 2019, 1:01 PM
Mind To Machine 💻🕆
Mind To Machine 💻🕆 - avatar
+ 2
scanf is a scan function, it will get any input according to how you format it (eg. %d, %s). gets is a get string function that gets a string input. getchar is a get character function that only takes in characters. scanf is probably the safest and best of those options
2nd Jul 2019, 11:59 AM
Pete Cowling
Pete Cowling - avatar