answersLogoWhite

0

In C, also in C++, the for loop executes zero or more times, until the test expression is false...

for (init-expression; test-expression; loop-expression) statement;

/* init-expression executed once, at beginning */

/* statement executes zero or more times, until test-expression is false, test first */

/* loop-expression evaluated at end of each iteration */

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Does 'for loop' works in C plus plus?

In C++, a for loop is structured as follows: for( int index = 0; index < 10; ++i ) { //do something }


Is for loop is faster than while loop in turbo c plus plus compiler?

No, why did you think so?


Example of flowchart of while loop in c plus plus?

kk


What is CPU usage small programm c plus plus?

Example: int main (void) { LOOP: goto LOOP; }


How do you alternate the input numbers using for loop in c plus plus?

Input a variable.


How do you convert meters to centimeters in c plus plus using the for loop construct?

It is unnecessary to use a for loop to convert meters to centimeters. Just multiply by 0.01.


C plus plus file processing that will input 12 integers?

#include<iostream> #include<vector> int main() { std::vector<int> integers (12); for (size_t loop=0; loop<integers.size(); ++loop) cin >> integers[loop]; }


C program to print numbers 1 to n?

how do we use loops in c plus plus programing and what are basic differences between do,for and while loop


How do you write a C plus plus program that displays a pyramid of Xes on the screen using a for loop?

printf ("x")


How to complete this C plus plus End Of File controlled while loop program?

Add the missing parts.


What is an infinite loop in c plus plus?

An infinite loop is one sequence of commands that just repeats over and over again forever. When it comes to creating an infinite loop you can use the: for do while and do statements. using the keywords 'true'


How does C plus plus endeavor to represent the loop paradigm?

Iterative loops in C/C++ are represented by for(), while() and do...while() code blocks. Recursive loops are represented by functions calling themselves.