Gets() in c program | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Gets() in c program

I did not understand why is char[100]; gets(a); is written what is the meaning of it?

29th Sep 2020, 1:26 PM
Vivek Sai
Vivek Sai - avatar
2 Respostas
+ 3
gets() is function used to read the line of stings from standard input into argument charecter array a. Check this by gets(a); puts(a); //outputs what ever read by gets() into a. gets() is a non-standard deprecated function. So recommend that avoid using gets() instead use fgets()..
29th Sep 2020, 1:32 PM
Jayakrishna šŸ‡®šŸ‡³
0
Ok
29th Sep 2020, 1:33 PM
Vivek Sai
Vivek Sai - avatar