i want to know how (gets)works
No, you don't. You want to stay away from gets() entirely, in fact. The function is extremely dangerous, because it is prone to buffer overruns, and no experienced C/C++ programmer still uses it.
Well, knowing how it works and using it are entirely different.
I agree with Schol-R-LEA in that you should never use this function. However, if you want to learn how it works internally to better understand it and why you should avoid it - that is a good thing.
Look for an open source implementation of it (FreeBSD, for example: gets.c)
Edited 2 Years Ago
I am working creating a fully encapsulated, homogeneous singly linked data structure. The Listing class and SinglyLinkedList class that are part of the whole application compile fine, but the problem ...
I have this block of code where l run through a table and display matched results in a listbox.
It works fine, but my question is how do l enable ...
I have developed a DBMS and I want to store the credentials for server, and user name securely so that the users don't have to enter the password ...