[WEBINAR] The New Normal: Dealing with the Reality of an Unsecure World


Definition - What does Iteration mean?

Iteration, in the context of computer programming, is a process wherein a set of instructions or structures are repeated in a sequence a specified number of times or until a condition is met. When the first set of instructions is executed again, it is called an iteration. When a sequence of instructions is executed in a repeated manner, it is called a loop.

Techopedia explains Iteration

Iteration is the repetition of a process in a computer program, usually done with the help of loops.
An example of an iteration programming language is as follows:

Consider a database table containing 1000 student records. Each record contains the following fields:

  • First name
  • Last name
  • Roll no

If one wants to copy all the student records from the database and print them, the best way to retrieve the record is to iterate or loop through each record. It can be executed using the for loop statement as shown below:

for (int i=0;i<1000;i++)
\\Print first name and last name from table

In the above example, i is an iterator starting from the first student record to the last student record.

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
"Techopedia" on Twitter

Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.