Thursday, December 23, 2010

SEMESTER???? KICKED OFF!!!

Hey Folks....

Long time after the semesters I got a scope of writing the blog which I had cherishedly started since long. The semesters have ended and I have come home and suddenly I find and irresistible urge to blog. As I don’t have internet connection at home I write them in WordPad and then proceed off in copying them my blog page....

Well for the record that I have started taking up computers as to remain a bit indulged in the holidays as well as taken up programming in the time being. The language is C. I found C available here for two reasons.

     I) I got hold of the C-Free IDE (Standard Edition) which supports both C/C++ though I have taken up the C section I am also trying to take up the C++ portion as it has a little bit difference in syntax. (as told by my friends)

   II) Secondly as a reference I got hold of the Let Us C book by Yashavant Kanetkar by BPB Publication 6th edition. This book though belonged to my elder brother when he had just joined his B.E course in Electronics.

I had previously covered upto Loops..  Finding Patterns very tedious and difficult but all the same interesting.
Proceeded upto Functions in C. Now I can atleast write multiple functions in C and hence find it to be a bit easy to see that it converts difficult problems into simpler ones by giving it a modular approach.  

Hence now finding the sum of prime numbers between 1 and 10000 is easier as I can break it into two functions. Also I am proceeding to RECURSIVE FUNCTIONS. Now that is some interesting thing where loops are replaced by functions which call themselves hence do similar jobs as loops. But it has a bit difficult approach as it can have devastating results when programmed a bit stupidly. I have also done some coding in Arrays. Also the Character Array stuff too....

As I flip through the pages I find topics such as "I/O File" , "Pointers","Data Structures".... etc which I have  to learn as I may have them in my course....

Another interesting topic I found is that as I was coding a program to find the sum of prime numbers between 1 to 1 million.. I found that they did not return me any output. Funny they returned me outputs at 10 thousand but they did not return me anything at 1 million. I had put long datatypes everywhere and also it was between the range but there was no output. I guess the logic was too tedious and time-exhausting as well that a better code needs to be devised so that the answer is prompt and fast.. Got to work upon it.....
                                                  ADIEU
                                                  Maharshi


PS: Recently got myself an account in SPOJ (SPhere Online Judge). Solved one problem out there the first one titled THE LIFE THE UNIVERSE EVERYTHING.. Next target is the SMALL FACTORIAL one. It has a challenge of running 10 test cases and finding out upto max 100!. Interestingly that is what I am working upon right now as 100! has 200 digits and no data type supports 200 digit long number. Figure out a system by myself. Probably arrays will suffice it.


 

No comments:

Post a Comment