It's all fun and dandy that people give the OP links to certain more or less advanced guides, but we ought to also ask what he actually wants to program.
As it was mentioned before, there are the questions of language, platform and, well, the target application that we want to program. With general knowledge about programming, you won't ammount to much, meaning that you'll end up programming an Adder or something like it. What the OP should consider is making a definite choice as to what he's going to program, for what and with what language.
A C/C++ video game for the DS will inheritently have a different structure than a Java application for a mobile phone.
For a considerable period of time, BASIC was the language most commonly chosen by beginners. Nowadays it shifted a tier higher, to C and C++, and this is what I'm recommending aswell, as you can use C and C++ on just about any popular platform without much issues. Moreover, the structure of those languages is very straight-forward. You don't even have to know the particular details about the Standard library to actually program something - you have Intellisense for that.
Thing is, a structure of a C or C++ application can easily be "drawn" on a piece of paper - it's easy to draw a block scheme for it and it's easy to describe it on a piece of paper aswell, even without comments in the code (unless it's purposely ambiguous).
If you will end up choosing C or C++, I recommend to you:
http://www.cplusplus.com/ - a fantastic library refference that contains all the possible functions. Each function has a little programming example attached to it, as well as functions similar to the one in question mentioned in the appendix. It's a really, really useful tool when you're not quite sure "how" to do something but you know what exactly has to be done.