<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>difference between break and continue statements in c - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/difference-between-break-and-continue-statements-in-c/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/difference-between-break-and-continue-statements-in-c/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Fri, 07 Oct 2022 05:37:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>difference between break and continue statements in c - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/difference-between-break-and-continue-statements-in-c/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Explain break and continue statements with examples</title>
		<link>https://www.wikitechy.com/interview-questions/c/explain-break-and-continue-statements-with-examples/</link>
					<comments>https://www.wikitechy.com/interview-questions/c/explain-break-and-continue-statements-with-examples/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Fri, 07 Oct 2022 05:35:57 +0000</pubDate>
				<category><![CDATA[C]]></category>
		<category><![CDATA[break and continue in c programming]]></category>
		<category><![CDATA[break and continue statement in c]]></category>
		<category><![CDATA[break statement in c example]]></category>
		<category><![CDATA[break vs continue in c]]></category>
		<category><![CDATA[c break and continue]]></category>
		<category><![CDATA[c break and continue with examples]]></category>
		<category><![CDATA[c programming break and continue statements]]></category>
		<category><![CDATA[continue statement in c example]]></category>
		<category><![CDATA[difference between break and continue statement in c]]></category>
		<category><![CDATA[difference between break and continue statements in c]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4947</guid>

					<description><![CDATA[Break This statement is used with switch statement. Can also be used with while loop, do – while loop and for loop. When the control encounters a break statement, the control will terminate the loop immediately and the statements after break will not be executed. Syntax Sample Code Output Continue This statement is used to [&#8230;]]]></description>
										<content:encoded><![CDATA[<h2 id="break" style="text-align: justify;"><strong>Break</strong></h2>
<ul style="text-align: justify;">
<li>This statement is used with switch statement.</li>
<li>Can also be used with while loop, do – while loop and for loop.</li>
<li>When the control encounters a break statement, the control will terminate the loop immediately and the statements after break will not be executed.</li>
</ul>
<h3 id="syntax" style="text-align: justify;">Syntax</h3>
<p style="text-align: justify;"><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-4948 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/10/c-break-statement.jpg" alt="" width="529" height="346" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/10/c-break-statement.jpg 529w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/10/c-break-statement-300x196.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/10/c-break-statement-390x255.jpg 390w" sizes="(max-width: 529px) 100vw, 529px" /></p>
<h3 id="sample-code" style="text-align: justify;">Sample Code</h3>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-c code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-c code-embed-code">#include&lt;stdio.h&gt;<br/>int main()<br/>{<br/>  <br/>    int i = 0 , j = 0;<br/>  <br/>    // Iterate a loop over the<br/>    // range [0, 5]<br/>     for(int i = 0 ; i &lt; 5 ; i ++)<br/>    {<br/>          printf(“i = %d, j = “, i);<br/>  <br/>        // Iterate a loop over the<br/>        // range [0, 5]<br/>        for(int j = 0 ; j &lt; 5 ; J ++){<br/>  <br/>            // Usage of Break statement<br/>             If ( j == 2)<br/>            <br/>                break;<br/>             printf(“%d “, j);<br/>                    }<br/>  <br/>        printf(&quot;\n&quot;);<br/>    }<br/>  <br/>    return 0;<br/>}</code></pre> </div>
<h3 id="output" style="text-align: justify;">Output</h3>
<p style="text-align: justify;"><img decoding="async" class="alignnone size-full wp-image-4949 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/10/break-statement-in-c.jpg" alt="" width="146" height="164" /></p>
<h2 id="continue" style="text-align: justify;"><strong>Continue</strong></h2>
<ul style="text-align: justify;">
<li>This statement is used to bring the control to the beginning of the loop.</li>
<li>The continue statement skips some lines of code inside the loop and continues with the next iteration.</li>
<li>It is mainly used in a program for skiiping certain condition.</li>
<li>This statement does not exit from the loop of the body.</li>
<li>It is not used to exit from the loop body.</li>
<li>Continue statement is not used with switch statement.</li>
<li>It can be used only with while, do while and for loop.</li>
<li>When the control encounters continue statement,control automatically executes the remaining statements of the loop body.</li>
</ul>
<h3 id="syntax-2" style="text-align: justify;">Syntax</h3>
<p style="text-align: justify;"><img decoding="async" class="alignnone size-full wp-image-4950 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/10/difference-between-break-and-continue.jpg" alt="" width="559" height="325" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/10/difference-between-break-and-continue.jpg 559w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/10/difference-between-break-and-continue-300x174.jpg 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/10/difference-between-break-and-continue-390x227.jpg 390w" sizes="(max-width: 559px) 100vw, 559px" /></p>
<h3 id="sample-code-2" style="text-align: justify;">Sample Code</h3>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-c code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-c code-embed-code">#include &lt;stdio.h&gt;<br/>  <br/>// Driver Code<br/>int main()<br/>{<br/>      Int i = 0 , j = 0 ;<br/>  <br/>    // Iterate the loop over the range[0,5]<br/>    for (int i = 0; i &lt; 5; i++) {<br/>         printf(“i = %d, j = “, i);<br/>        // Iterate the loop over the range[0,5]<br/>        For(int j = 0; j &lt; 5 ; j++){  <br/>         // Usage of Continue Statement<br/>            if (j == 2)<br/>                continue;<br/>              printf(&quot;%d &quot;, j);<br/>        }<br/>            printf(“\n”);<br/>            }<br/>  <br/>    return 0;<br/>}</code></pre> </div>
<h3 id="output-2" style="text-align: justify;">Output</h3>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4951 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/10/c-continue-statement.jpg" alt="" width="192" height="160" /></p>
<p style="text-align: justify;">
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/c/explain-break-and-continue-statements-with-examples/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
