Careerbanalo

Careerbanalo Learn C And Data structure from the Basic level to Highest level.Implementation of Basic algorithm with the help of c and Data Structure.

15/01/2014

What is the major difference between for and while ?

For loop is suitable for situations when we know in advance how many times the loop will continue .
But While loop is suitable for situations when we don't know how many times the loop will iterate.
Example:-Display all numbers from 1 to 10. Here we know is advance the loop will continue 10 times,so For loop is suitable.
Example While:- Count number of bits set to 1 in an interger 375.Here in advance we don't know what is the binary of 375 and how many bits are set to 1, so while loop is suitable here.

15/01/2014

What is the major Difference between loop and recursion ?

It is said that any problem which can be solved by recursion can also be solved by iteration(looping).
It is true,but sometimes the iterative way to do something is much more complex to set up and implement
Looping is simply executing one piece of code over and over.
Recursion also loops through the same code but in recursion a subroutine actually calls itself.
Neither can be defined as "best" as it just depends on the problem you are trying to solve.
Recurion is not used anywhere near as often as looping especially since it's harder to use properly.

07/01/2014

Basic Of C

Why We Learn C...?

C is a middle level language which is used to develop system program which will interact with the computer hardware and compute result.
We use C programming language to develop operating system,Graphics programming and many others system software.
http://fifotechno.blogspot.in/2014/01/basic-of-c.html

Address

Bhubaneswar
751024

Alerts

Be the first to know and let us send you an email when Careerbanalo posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Share