Skip to main content

How to Understand Repetition in C Language


 How to Understand Repetition in C Language 

Loop Control Instructions: The programs that we have developed so far used either a sequential or a decision control instructions. In this article, we learn about loops, types of loops and structure of loops.

So, Loops is…..

In programming, we frequently need to perform an action over and over, often with variations in the details each time. 

The versatility of a computer lies in its ability to perform a set of instructions repeatedly. This involves repeating some portion of the program either a specified number of times or until a particular condition is satisfied. This repetitive operation is done through a loop control instruction

There is three-way to repeat a part of a program. They are:

1.      Using a while statement.

2.      Using for statement.

3.      Using do-while statement.


Structure of loops:

1.      While loop:

2.      For loop:

3.      Do-while loop:

Some important point for creating loop control instructions:

·         I++ increments value by 1.

·         I- -decrement value of 1.

·         If j=++I; first increment I, then assigned the increment value to j.

·         If j=- -I; first assign the current value of I to j, then increments j.

Note: there are no **,// and %% operators.

Comments

Popular posts from this blog

How To Know Best Tools For Social Media Marketing Part 2

  Best Tools For Social Media Marketing Part 2 Today we will tell you about social media marketing tools Part 2. in this article remaining 6 tools, which are helping in a social media campaign. Unsplash: - It is very important to have amazing images while having high-quality textual content. Unsplash provides a database of high-resolution, great images that you can use with your posts, the fact that a good image has its own unique significance cannot be denied. Each image is properly tagged so that you can find the most appropriate image for your post. Marin: - If your agency runs a social media advertising campaign (campaign), then this social media management tool will be useful for you. Marin offers a range of features that promise to increase your ROI by up to 30% compared to native equipment. One of its cool features is called auto-split which helps your audience in the micro-segment. Nimble: - As your customer list grows, a powerful CRM is needed to automate data manag...