Thanks bogosort for your excellent explanation.Assuming that you're learning programming for practical (rather than academic) reasons, here are some general thoughts:
I will soon start a programming for 8051 microcontroller. I have just started reading about it.
I wanted to learn the c programming very well before starting embedded c programming, This is reason I was solving some common practice exercise of c programming.