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

Sort wars, Explain each of the algorithms in a way that would be understand...

Explain each of the algorithms in a way that would be understandable to an intelligent person who is not familiar with programming. You should not use any code (or even pseudo code

Palindrome, A palindrome is a string that reads the same from both the ends...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Area under curve., find the c program to find area under the curvey=f(x) ...

find the c program to find area under the curvey=f(x)   #include float start_point, /* GLOBAL VARIABLES */ end_point, total_area;

Program to write c++ program, program to write superposition of waves using...

program to write superposition of waves using class and objects

I need asp .net facebook app project completion, I need Asp .net Facebook a...

I need Asp .net Facebook app project completion Project Description: We are urgently seeking a few remaining items to be completed, and the project to be deployed to live.

Determine the current flowing in the circuit - voltage, Four cells, each wi...

Four cells, each with an internal resistance of 0.40 ? and an e.m.f. of 2.5 V are connected in series to a load of 38.40 ?. (a) Verify the current flowing in the circuit and t

What does extern "c" int func(int *, A: This will turn o_ "name mangling" f...

A: This will turn o_ "name mangling" for func so that one can connect to code compiled by a C compiler.

Assignment, Ask question #MA company is rewriting its payroll system to mov...

Ask question #MA company is rewriting its payroll system to move it from an old mainframe to a distributed mini-computer/PC-based networked setup. No new functionality will be adde

, Question 1 / 1 You have an N x N chessboard and you wish to place N king...

Question 1 / 1 You have an N x N chessboard and you wish to place N kings on it. Each row and column should contain exactly one king, and no two kings should attack each other (two

HASH., Define hash functions. Explain the Division method, Mid square metho...

Define hash functions. Explain the Division method, Mid square method and Folding method of hash functions.

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