I'm sharing my experience of learning, programming in C ( C++ ). Learning C has always been a very interesting for me. I was going very smooth until I reached pointers and got very confused by various books. The most simple of all the books on, programming in C, is " Let us C" by "Yaswant Kanitkar". This book is very simple and explains the basic concepts as they should be explained to the beginners.
"Where to start from" is often a very difficult stage for beginners. The most simple rule is "No Jumping". Don't jump from topics. Proceed in a consistent manner. I highly recommend beginners to programming in C to get a good compiler. "Turbo C" is the most frequently used compiler. Its much like Dos, often scary for beginners. :) Secondly, learn the basic structure of a program. Almost, all of the programs share a common, basic structure. For example,
#include
#include
void main(void)
{
here we type our program
}
Above is the basic structure of a program. Don't worry! You don't have to memorize it. Just take it as it is, at first and start understanding variables. After you understand, what a variables are, get into the basic syntax. Syntax is the language of any programming language, understandable to the compiler. Learn basic input output commands and play with variable. This will make you familiar with the Compiler.
A good programmer has three qualities/skills.
1) Knowing the Language( C in our case)
2) Imagination ( Think like the computer)
3) Logic ( understanding a process and implementing it)
After you are done with input/output basics, learn about loops. Loops are nothing but repetition of a process, unless certain condition is met. Like if you want to display "Programming in C", a thousand times on your screen. It will take a lot of time to do it manually. So, this is where loops come into play. Learn about one loop at a time and practice it. For example, Learn "For Loop" and try to print "Programming in C" for a hundred times on your monitor, then play with your program to make it display it for different number of times.
If you follow the above steps, it will give you a head start. Now, its time to learn about "Arrays". Arrays can be better understood as matrices. Play with it.
Its the right time for functions.
Don't get into pointers before you develop strong concepts. Pointers is among the last things that you should be looking at.
Hope it helps. I will be updating this blog, with links to sources on learning programming in C.
Good luck!
No comments:
Post a Comment