{"id":2319,"date":"2024-11-06T11:13:07","date_gmt":"2024-11-06T11:13:07","guid":{"rendered":"https:\/\/itnotes.apjsoftwares.in\/?p=2319"},"modified":"2024-11-06T11:13:07","modified_gmt":"2024-11-06T11:13:07","slug":"break-and-continue","status":"publish","type":"post","link":"https:\/\/itnotes.apjsoftwares.in\/index.php\/2024\/11\/06\/break-and-continue\/","title":{"rendered":"break and continue"},"content":{"rendered":"\n<p>The break statement is used to terminate the innermost loop. It generally terminates a loop or a break statement. The continue statement skips to the next iteration of the loop. Below is the C program to demonstrate break and continue in C:<\/p>\n\n\n\n<p><br>#include <em>&lt;stdio.h><\/em><br>int main()<br>{<br>  <strong>for<\/strong> (int i = 1; i &lt;= 10; i++) <br>  {<br>    <strong>if<\/strong> (i == 2) <br>    {<br>      <strong>continue<\/strong>;<br>    }<br>    <strong>if<\/strong> (i == 6) <br>    {<br>      <strong>break<\/strong>;<br>    }<br>    printf(&#8220;%d &#8220;, i);<br>  }<br>  <strong>return<\/strong> 0;<br>}<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">1 3 4 5 <\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The break statement is used to terminate the innermost loop. It generally terminates a loop&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[],"_links":{"self":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/2319"}],"collection":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/comments?post=2319"}],"version-history":[{"count":1,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/2319\/revisions"}],"predecessor-version":[{"id":2320,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/2319\/revisions\/2320"}],"wp:attachment":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/media?parent=2319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/categories?post=2319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/tags?post=2319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}