I've stated that the conscious mind is the primary center for input and output (as compared to the subconscious), and that is largely correct from a certain point of view. However, it's important to go into some more detail about how data information is filtered and processed before we go much further.
Before we can program a computer to achieve the maximum result, we have to understand the capabilities and design of the system. If you cannot understand registers and memory allocation, you cannot possibly maximize their utility. The same, I propose, is true of ourselves.
Subconscious and Conscious
We are all aware of the conscious mind. When
If I were to ask you what the most common type of hack is, you'd probably guess something like SSL Injection, or Buffer Overflow, or something of that nature. You wouldn't be entirely wrong, but there's a much more general answer that covers all those things:
The most common attack is bad input
When it boils
We know how to send input from the terminal. Now we'll look at the right and wrong ways to do keyboard input within your program.
Reading Input from Standard Input
Have you ever seen a program which used a prompt to ask for something? For a simple case, it could look like this:
There are numerous functions