May 2012
Intermediate to advanced
679 pages
16h 56m
English
In this part, we will see the statements, which can loop around. This process is termed as iteration. Iteration means the act of repeating a process usually with the aim of approaching a desired goal or target or result. Each repetition of the process is also called “iteration”. The result of iteration is used as the starting point for the next iteration. Such statements will increase the power of computer tremendously. Let us start with very popular statement called “for statement”.
The for statement is most useful control statement. It allows us to repeat a statement (or a block) for number of times. The general format of for statement is as follows:
for ( expression1; expression2; expression3) ...
Read now
Unlock full access