"Good Programmer's note sharing" C-language break and continue

Source: Internet
Author: User

iOS training------My C language notes, look forward to communicating with you!

#include <stdio.h>/*break:1.1> switch statement: Exits the entire switch statement 2> loop structure: Exits the entire loop statement * while * does while * for 2. Note Points are only valid for the nearest loop structure Continu E:1. Usage Cycle structure: Ends the current loop body, enters the next loop body * while * does while * for 2. Note Points are only valid for the nearest loop structure*/intMain () {/*for (int i = 0; i<5; i++) {if (i%2) {//I is odd: 1, 3 continue; }} printf ("%d\n", I);*/    //output results;        0    2    4    /*for (int i = 0; i<3; i++) {printf ("Ha ha \ n");        Continue    printf ("hahaha 23\n"); }*/    //output results;Ha haha haha ha ha haha for(inti =0; i<3; i++)    {         for(intj =0; j<2; J + +)        {            if(j==1)            {                 Break; } printf ("a\n"); }                 Break; printf ("b\n"); }    //output results; A    return 0; s}

"Good Programmer's note sharing" C-language break and continue

Related Article

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.