<?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>recursion vs iteration advantages - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/recursion-vs-iteration-advantages/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/recursion-vs-iteration-advantages/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Fri, 03 Sep 2021 06:14:24 +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>recursion vs iteration advantages - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/recursion-vs-iteration-advantages/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Ashima wants to print a pattern which includes checking and changing a variables value iteratively She decides to use a loop/condition &#8230;</title>
		<link>https://www.wikitechy.com/interview-questions/recursion-and-iteration/ashima-wants-to-print-a-pattern-which-includes-checking-and-changing-a-variables-value-iteratively-she-decides-to-use-a-loop-condition/</link>
					<comments>https://www.wikitechy.com/interview-questions/recursion-and-iteration/ashima-wants-to-print-a-pattern-which-includes-checking-and-changing-a-variables-value-iteratively-she-decides-to-use-a-loop-condition/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Sat, 28 Aug 2021 17:16:15 +0000</pubDate>
				<category><![CDATA[Recursion and Iteration]]></category>
		<category><![CDATA[a while statement must execute its loop at least once]]></category>
		<category><![CDATA[Ashima wants to print a pattern]]></category>
		<category><![CDATA[Ashima wants to print a pattern which includes checking]]></category>
		<category><![CDATA[Ashima wants to print a pattern which includes checking and changing a variables]]></category>
		<category><![CDATA[Ashima wants to use a loop/conditiondo while c#]]></category>
		<category><![CDATA[difference between recursion and iteration in]]></category>
		<category><![CDATA[difference between recursion and iteration in c with example]]></category>
		<category><![CDATA[difference between recursion and iteration with example]]></category>
		<category><![CDATA[do while c++]]></category>
		<category><![CDATA[do while javado while loop c++]]></category>
		<category><![CDATA[do while loop]]></category>
		<category><![CDATA[do while loop javascript]]></category>
		<category><![CDATA[does a for loop always run once java]]></category>
		<category><![CDATA[does a for loop execute at least once java]]></category>
		<category><![CDATA[recursion and iteration examples]]></category>
		<category><![CDATA[recursion c]]></category>
		<category><![CDATA[recursion vs iteration]]></category>
		<category><![CDATA[recursion vs iteration advantages]]></category>
		<category><![CDATA[recursion vs iteration c++]]></category>
		<category><![CDATA[recursion vs iteration example]]></category>
		<category><![CDATA[TCS Ninja Coding Questions with Answers | TCS Ninja Coding Questions 2021 | TCS Ninja Programming MCQ Questions]]></category>
		<category><![CDATA[the body of a do ... while loop executes at least one time.]]></category>
		<category><![CDATA[what is recursion]]></category>
		<category><![CDATA[what loop always executes at least once]]></category>
		<category><![CDATA[which loop executes at least once]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=2647</guid>

					<description><![CDATA[Answer : C. Do-while loop]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<p class="color-pink">Ashima wants to print a pattern which includes checking and changing a variables value iteratively She decides to use a loop/condition Which of the following options should she use such that the body of the loop/condition is executed at least once whether the variable satisfies the entering condition or not ?</p>
<div class="row">
<div class="col-sm-4">
<p>A. For loop</p>
</div>
<div class="col-sm-4">
<p>B. While loop</p>
</div>
<div class="col-sm-4">
<p>C. Do-while loop</p>
</div>
<div class="col-sm-4">
<p>D. Switch case</p>
</div>
<div class="col-sm-4">
<p>E. None of these</p>
</div>
</div>
</div>
</div>
<h3 id="answer-c-do-while-loop"><b>Answer : </b>C. Do-while loop</h3>
<div class="subheading">
<h2 id="explanation">Explanation:</h2>
</div>
<div class="subheading">
<h2 id="do-while-loop" class="color-green">Do While Loop :</h2>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li>Unlike for and while loops, which test the loop condition at the top of the loop, the do&#8230;while loop in C programming checks its condition at the bottom of the loop.</li>
<li>A do&#8230;while loop is similar to a while loop, except the fact that it is guaranteed to execute at least one time.</li>
</ul>
<div class="subheading">
<h2 id="syntax-for-do-while-loop" class="color-green">Syntax for Do While Loop :</h2>
</div>
<div class="CodeContent">
<div class="hddn">
<figure class="highlight">
<pre><code class="hljs bash" data-lang=""><span class="nt"><span class="hljs-keyword">do</span> {
     statement(s);
}    <span class="hljs-keyword">while</span>( condition );</span></code></pre>
</figure>
</div>
</div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/recursion-and-iteration/ashima-wants-to-print-a-pattern-which-includes-checking-and-changing-a-variables-value-iteratively-she-decides-to-use-a-loop-condition/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
