C Language for Loop

Source: Internet
Author: User

Expression 1; Judgment 2; expression 3;

{

Execute code block

}

Order: Expression 1 To determine if 2 is true if True, execute code block execution Expression 3 again to determine if False for 2 is true to end the loop

Expression 1 is an assignment statement that controls the initial value of a variable, and expression 2 (judgment 2) is a relational expression used to determine when to end a loop: The expression 3 is how the control variable is transformed after each loop.!! Each section can be empty but must be used::: Separated

That is, the format must be for (1; 2; 3) such expressions 1 and 3 can be multiple expressions separated by commas of relational expressions or logical expressions, but also numeric expressions or character expressions, as long as their value is nonzero, the loop body is executed

C Language for Loop

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.