Explain the loop statements in computer programming, C/C++ Programming

Assignment Help:

Explain the Loop Statements in Computer Programming?

1. C gives you a choice of three kinds of loop, while, do while and for.

2. The while loop remain repeating an action until an associated test returns false. This is useful where the programmer doesn't know in advance how many times the loop will be traversed.

3. The do while loops is alike, but the test take place after the loop body is executed. This make sure that the loop body is run at least once.

4. The 'For loop' is often used, typically where the loop will be traversed a fixed number of times as It is very flexible.


Related Discussions:- Explain the loop statements in computer programming

#titlbinary searching.., Ask question #Minimum 100 words awhat is the pre c...

Ask question #Minimum 100 words awhat is the pre condition for binary searching ccepted#

A Padovan string P(n) for a natural number n, c program for padovan string ...

c program for padovan string   Padovan series are positive integers obtained by the following process: The Padovan series is the sequence of integers P(n) defined by the

Prime no., program to find if a no . is prime or not

program to find if a no . is prime or not

Explain the relationship between an array and pointers, Relationship betwee...

Relationship between an Array and Pointers. Consider the following. int arr[] = {0,1,2,3,4,5,6,7,8,9}; If we write arr , it is considered as the address of the first elem

Program to track the hours an employee worked , Description: Create a...

Description: Create a program that allows the user to track the hours an employee worked in a week. How much the employee was paid and any extra hours worked (overtime pay).

Subrotine assembly language, You have to write a subroutine (assembly langu...

You have to write a subroutine (assembly language code using NASM) for the following equation.

program to conduct timber structural component design, The question descri...

The question description: You are required to make a C++ program to conduct timber component (beam and column) structural design according to EC5 (all the relevant design codes

M - algorithm corrections, Of course it is C[i] = A[i] + B[i].It was a typi...

Of course it is C[i] = A[i] + B[i].It was a typing mistake,never mind. You just understand the concept. 27-1 b. for grain-size=1 n=A.length grain-size=1 r=n for

Recursion, write a cprogram to calculate fraction through recursion

write a cprogram to calculate fraction through recursion

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd