CFanatic

Go Back   CFanatic > Programming > C Programming

Join CFanatic Forum Now

What is loop topic posted under C Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2010, 10:31 PM
Member
 
Join Date: Feb 2010
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
techinspiration is on a distinguished road
| More
What is loop

Hi
i am a student and i have a question that what is loop.
Reply With Quote
  #2  
Old 04-25-2010, 10:32 PM
Member
 
Join Date: Feb 2010
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
techme is on a distinguished road
| More
Re: What is loop

A loop is used to repeat a piece of code until some condition is met.
Reply With Quote
  #3  
Old 07-28-2010, 09:06 AM
Junior Member
 
Join Date: Jul 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
cb92 is on a distinguished road
Send a message via Yahoo to cb92
| More
Re: What is loop

Sometimes you need to do a series of actions for a number of times, or until some condition is met. The code written for that purpose is called a loop.
Reply With Quote
  #4  
Old 08-07-2010, 06:11 AM
Junior Member
 
Join Date: Jul 2010
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
ksrao is on a distinguished road
| More
Re: What is loop

LOOP:
In looping, a sequence of statements are executed until some conditions for the termination of the loop are satisfied.

loop contains two parts
1. Body of the Loop
2. Control statement

in C-language there are three constructs for Loops
1.The While loop
2. The Do ..While loop
3. The For Loop

1.While ( Condition)
{


Body
};

2.Do
{


Body

}
While (condition);

3.for ( i=1;i<=100;i++)
{

Body
}

try some online tests at wiziq dot com that will help to build your knowledge.

Kolla Sanjeeva Rao
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Couting the attempts in a 'while' loop? HannahMar C# Programming 4 11-23-2010 10:33 AM
Loop problem creative C Programming 6 04-02-2010 09:17 PM
Do While loop syntax codeunlock C# Programming 1 04-29-2007 08:31 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 05:02 AM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board