<?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 and Iteration - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/category/recursion-and-iteration/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/category/recursion-and-iteration/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Fri, 03 Sep 2021 06:21:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>Recursion and Iteration - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/category/recursion-and-iteration/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>What is the output of this C code ? &#124; Recursion Program in C &#124; Recursion in C</title>
		<link>https://www.wikitechy.com/interview-questions/recursion-and-iteration/what-is-the-output-of-this-c-code-recursion-program-in-c-recursion-in-c/</link>
					<comments>https://www.wikitechy.com/interview-questions/recursion-and-iteration/what-is-the-output-of-this-c-code-recursion-program-in-c-recursion-in-c/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Sat, 28 Aug 2021 17:26:53 +0000</pubDate>
				<category><![CDATA[Recursion and Iteration]]></category>
		<category><![CDATA[c functions list]]></category>
		<category><![CDATA[c programming functions exercises]]></category>
		<category><![CDATA[c programming if else example]]></category>
		<category><![CDATA[c programming if else exercises]]></category>
		<category><![CDATA[c++ if else practice problems]]></category>
		<category><![CDATA[else if ladder in c flowchart]]></category>
		<category><![CDATA[else if statement c programming]]></category>
		<category><![CDATA[function call in c]]></category>
		<category><![CDATA[function declaration in c]]></category>
		<category><![CDATA[functions in c programming with examples]]></category>
		<category><![CDATA[if else c]]></category>
		<category><![CDATA[if else if]]></category>
		<category><![CDATA[if else if ladder example in java]]></category>
		<category><![CDATA[if else if ladder in c++]]></category>
		<category><![CDATA[if else ladder in java]]></category>
		<category><![CDATA[if else program in c]]></category>
		<category><![CDATA[if else statement]]></category>
		<category><![CDATA[if else statement c++]]></category>
		<category><![CDATA[if else statement in c]]></category>
		<category><![CDATA[if else statement java]]></category>
		<category><![CDATA[nested if else c++]]></category>
		<category><![CDATA[nested if else in c programming examples]]></category>
		<category><![CDATA[nested if else in java]]></category>
		<category><![CDATA[syntax of function in c]]></category>
		<category><![CDATA[TCS Ninja Coding Questions with Answers | TCS Ninja Coding Questions 2021 | TCS Ninja Programming MCQ Questions]]></category>
		<category><![CDATA[types of functions in c]]></category>
		<category><![CDATA[types of functions in cuser defined functions in c]]></category>
		<category><![CDATA[user defined functions in c]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=2653</guid>

					<description><![CDATA[Answer : D. This code will generate an error.]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<p class="color-pink">What is the output of this C code ?</p>
<div class="CodeContent">
<div class="hddn">
<figure class="highlight">
<pre><code class="hljs bash" data-lang=""><span class="nt">Function <span class="hljs-function"><span class="hljs-title">main</span></span>() {
  Integer i = <span class="hljs-number">0.7</span> Static <span class="hljs-built_in">float</span> m = <span class="hljs-number">0.7</span>
  If(m equals i)
  Print(“We are equal”)
  Else
  If(m > i)
  Print(“I am greater”)
  Else
  Print(“I am lesser”)
}</span></code></pre>
</figure>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<p>A. We are equal.</p>
</div>
<div class="col-sm-6">
<p>B. I am greater.</p>
</div>
<div class="col-sm-6">
<p>C. I am lesser.</p>
</div>
<div class="col-sm-6">
<p>D. This code will generate an error.</p>
</div>
</div>
</div>
</div>
<h3 id="answer-d-this-code-will-generate-an-error"><b>Answer : </b>D. This code will generate an error.</h3>
<div class="subheading">
<h2 id="explanation">Explanation:</h2>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li>Two different <a href="https://www.wikitechy.com/tutorials/c-programming/c-data-type" target="_blank" rel="noopener">data types</a> cannot be linked with each other without <a href="https://www.wikitechy.com/tutorials/c-programming/typecasting-in-c" target="_blank" rel="noopener">type-casting</a>.</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/recursion-and-iteration/what-is-the-output-of-this-c-code-recursion-program-in-c-recursion-in-c/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ravi and Rupali are asked to write a program to sum the rows of 2X2 matrices stored in the array A..?</title>
		<link>https://www.wikitechy.com/interview-questions/recursion-and-iteration/ravi-and-rupali-are-asked-to-write-a-program-to-sum-the-rows-of-2x2-matrices-stored-in-the-array-a/</link>
					<comments>https://www.wikitechy.com/interview-questions/recursion-and-iteration/ravi-and-rupali-are-asked-to-write-a-program-to-sum-the-rows-of-2x2-matrices-stored-in-the-array-a/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Sat, 28 Aug 2021 17:26:14 +0000</pubDate>
				<category><![CDATA[Recursion and Iteration]]></category>
		<category><![CDATA[3*3 matrix addition program in c]]></category>
		<category><![CDATA[addition of two matrix in c using 2d array]]></category>
		<category><![CDATA[c functions list]]></category>
		<category><![CDATA[c program for matrix addition and subtraction using two dimensional array]]></category>
		<category><![CDATA[c programming functions exercises]]></category>
		<category><![CDATA[c programming if else example]]></category>
		<category><![CDATA[c programming if else exercises]]></category>
		<category><![CDATA[c++ if else practice problems]]></category>
		<category><![CDATA[else if ladder in c flowchart]]></category>
		<category><![CDATA[else if statement c programming]]></category>
		<category><![CDATA[function call in c]]></category>
		<category><![CDATA[function declaration in c]]></category>
		<category><![CDATA[functions in c programming with examples]]></category>
		<category><![CDATA[if else if ladder example in java]]></category>
		<category><![CDATA[if else if ladder in c++]]></category>
		<category><![CDATA[if else ladder in java]]></category>
		<category><![CDATA[if else statement c++]]></category>
		<category><![CDATA[if else statement java]]></category>
		<category><![CDATA[matrix multiplication in c]]></category>
		<category><![CDATA[nested if else c++]]></category>
		<category><![CDATA[nested if else in c programming examples]]></category>
		<category><![CDATA[nested if else in java]]></category>
		<category><![CDATA[program to sum the rows of 2X2 matrices]]></category>
		<category><![CDATA[program to sum the rows of 2X2 matrices stored in the array A]]></category>
		<category><![CDATA[Ravi and Rupali are asked to write a program to sum the rows]]></category>
		<category><![CDATA[recursion in c]]></category>
		<category><![CDATA[recursion program in c]]></category>
		<category><![CDATA[recursion vs iteration c++]]></category>
		<category><![CDATA[recursion vs iteration example]]></category>
		<category><![CDATA[sum of elements in 2d array in c]]></category>
		<category><![CDATA[sum of rows and columns in 2d array in c++]]></category>
		<category><![CDATA[sum of rows and columns in 2d array in java]]></category>
		<category><![CDATA[syntax of function in c]]></category>
		<category><![CDATA[TCS Ninja Coding Questions with Answers | TCS Ninja Coding Questions 2021 | TCS Ninja Programming MCQ Questions]]></category>
		<category><![CDATA[types of functions in cuser defined functions in c]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=2652</guid>

					<description><![CDATA[Answer : B. Code b will execute faster than a]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<p class="color-pink">Ravi and Rupali are asked to write a program to sum the rows of 2X2 matrices stored in the array A.<br />
Ravi writes the following code (Code A):</p>
<pre> for n = 0 to 1 
 sumRow1[n] = A[n][1] + A[n][2]
 end</pre>
<p class="color-pink">Rupali writes the following code (Code B):</p>
<pre>sumRow1[0] = A[0][1] + A[0][2] 
sumRow1[1] = A[1][1] + A[1][2]</pre>
<p>Comment upon these codes (Assume no loop unrolling done by compiler) ?</p>
<div class="row">
<div class="col-sm-6">
<p>A. Code a will execute faster than b.</p>
</div>
<div class="col-sm-6">
<p>B. Code b will execute faster than a.</p>
</div>
<div class="col-sm-6">
<p>C. Code a is logically incorrect.</p>
</div>
<div class="col-sm-6">
<p>D. Code b is logically incorrect</p>
</div>
</div>
</div>
</div>
<h3 id="answer-b-code-b-will-execute-faster-than-a"><b>Answer : </b>B. Code b will execute faster than a</h3>
<div class="subheading">
<h2 id="explanation">Explanation:</h2>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li>Both codes are taking two steps of operation, so same complexity.</li>
<li>But if we consider the overhead of <a href="https://www.wikitechy.com/tutorials/c-programming/loops-in-c" target="_blank" rel="noopener">looping</a> (as it takes time to increment counter) then code b will be faster.</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/recursion-and-iteration/ravi-and-rupali-are-asked-to-write-a-program-to-sum-the-rows-of-2x2-matrices-stored-in-the-array-a/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is the output of the following pseudo code ? Int a = 456, b, c, d = 10; b = a/d; c = a-b; print c ?</title>
		<link>https://www.wikitechy.com/interview-questions/recursion-and-iteration/what-is-the-output-of-the-following-pseudo-code-int-a-456-b-c-d-10-b-a-d-c-a-b-print-c/</link>
					<comments>https://www.wikitechy.com/interview-questions/recursion-and-iteration/what-is-the-output-of-the-following-pseudo-code-int-a-456-b-c-d-10-b-a-d-c-a-b-print-c/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Sat, 28 Aug 2021 17:21:53 +0000</pubDate>
				<category><![CDATA[Recursion and Iteration]]></category>
		<category><![CDATA[advantages of recursion in c]]></category>
		<category><![CDATA[fine the output of the following pseudocode]]></category>
		<category><![CDATA[good recursion examples]]></category>
		<category><![CDATA[integer a=456 b c d=10]]></category>
		<category><![CDATA[recursion and iteration examples]]></category>
		<category><![CDATA[recursion c]]></category>
		<category><![CDATA[recursion crecursion vs iteration example]]></category>
		<category><![CDATA[recursion examples in c]]></category>
		<category><![CDATA[recursion in c]]></category>
		<category><![CDATA[recursion in c programming]]></category>
		<category><![CDATA[recursion problems in c]]></category>
		<category><![CDATA[recursion program in c]]></category>
		<category><![CDATA[recursion vs iteration]]></category>
		<category><![CDATA[recursion vs iteration c++]]></category>
		<category><![CDATA[recursive function in c]]></category>
		<category><![CDATA[simple recursion example]]></category>
		<category><![CDATA[TCS Ninja Coding Questions with Answers | TCS Ninja Coding Questions 2021 | TCS Ninja Programming MCQ Questions]]></category>
		<category><![CDATA[what is recursion in c explain with example]]></category>
		<category><![CDATA[what will be the output of the following code statements]]></category>
		<category><![CDATA[What will be the output of the following code statements integer a]]></category>
		<category><![CDATA[what will be the output of the following pseudo-code statements]]></category>
		<category><![CDATA[what will be the output of the following pseudo-code statements: integer a = 984]]></category>
		<category><![CDATA[What will be the output of the following pseudocode]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=2651</guid>

					<description><![CDATA[Answer : B. 411]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<p class="color-pink">What is the output of the following pseudo code ?</p>
<div class="CodeContent">
<div class="hddn">
<figure class="highlight">
<pre><code class="hljs bash" data-lang=""><span class="nt">Int a = <span class="hljs-number">456</span>, b, c, d = <span class="hljs-number">10</span>; 
b = a / d; 
c = a - b; 
<span class="hljs-built_in">print</span> c</span></code></pre>
</figure>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<p>A. 411.4</p>
</div>
<div class="col-sm-4">
<p>B. 411</p>
</div>
<div class="col-sm-4">
<p>C. 410.4</p>
</div>
<div class="col-sm-4">
<p>D. 410</p>
</div>
<div class="col-sm-4">
<p>E. None of these</p>
</div>
</div>
</div>
</div>
<h3 id="answer-b-411"><b>Answer : </b>B. 411</h3>
<div class="subheading">
<h2 id="explanation">Explanation:</h2>
</div>
<div class="Content">
<div class="hddn">
<p>b = 456/10<br />
= 45 (Quotient)<br />
c = 456 – 45<br />
= 411</p>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/recursion-and-iteration/what-is-the-output-of-the-following-pseudo-code-int-a-456-b-c-d-10-b-a-d-c-a-b-print-c/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Integer a =40, b =35, c=20, d =10 Comment about the output of the following two statements Print a*b/c-d Print a*b/(c-d) ?</title>
		<link>https://www.wikitechy.com/interview-questions/recursion-and-iteration/integer-a-40-b-35-c20-d-10-comment-about-the-output-of-the-following-two-statements-print-ab-c-d-print-ab-c-d/</link>
					<comments>https://www.wikitechy.com/interview-questions/recursion-and-iteration/integer-a-40-b-35-c20-d-10-comment-about-the-output-of-the-following-two-statements-print-ab-c-d-print-ab-c-d/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Sat, 28 Aug 2021 17:19:45 +0000</pubDate>
				<category><![CDATA[Recursion and Iteration]]></category>
		<category><![CDATA[advantages of recursion in c]]></category>
		<category><![CDATA[define recursion what are its types]]></category>
		<category><![CDATA[recursion c]]></category>
		<category><![CDATA[recursion examples]]></category>
		<category><![CDATA[recursion examples in c]]></category>
		<category><![CDATA[recursion in c]]></category>
		<category><![CDATA[recursion in c programming]]></category>
		<category><![CDATA[recursion problems in c]]></category>
		<category><![CDATA[recursive function in c]]></category>
		<category><![CDATA[simple recursion]]></category>
		<category><![CDATA[simple recursion example]]></category>
		<category><![CDATA[TCS Ninja Coding Questions with Answers | TCS Ninja Coding Questions 2021 | TCS Ninja Programming MCQ Questions]]></category>
		<category><![CDATA[types of recursion in c]]></category>
		<category><![CDATA[what is recursion in c explain with example]]></category>
		<category><![CDATA[What will be the output of the following code statements integer a 10 b]]></category>
		<category><![CDATA[what will be the output of the following pseudo-code statements]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=2649</guid>

					<description><![CDATA[Answer : A . Differ by 80]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<p class="color-pink">Integer a =40, b =35, c=20, d =10<br />
Comment about the output of the following two statements.</p>
<pre>I. Print a*b/c-d
II. Print a*b/(c-d)</pre>
<div class="row">
<div class="col-sm-6">
<p>A. Differ by 80</p>
</div>
<div class="col-sm-6">
<p>B. Same</p>
</div>
<div class="col-sm-6">
<p>C. Differ by 50</p>
</div>
<div class="col-sm-6">
<p>D. Differ by 160</p>
</div>
</div>
</div>
</div>
<h3 id="answer-a-differ-by-80"><b>Answer : </b>A . Differ by 80</h3>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/recursion-and-iteration/integer-a-40-b-35-c20-d-10-comment-about-the-output-of-the-following-two-statements-print-ab-c-d-print-ab-c-d/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>The construct “if (condition) then A else B” is used for which of the following purposes ?</title>
		<link>https://www.wikitechy.com/interview-questions/recursion-and-iteration/the-construct-if-condition-then-a-else-b-is-used-for-which-of-the-following-purposes/</link>
					<comments>https://www.wikitechy.com/interview-questions/recursion-and-iteration/the-construct-if-condition-then-a-else-b-is-used-for-which-of-the-following-purposes/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Sat, 28 Aug 2021 17:17:58 +0000</pubDate>
				<category><![CDATA[Recursion and Iteration]]></category>
		<category><![CDATA[decision making and branching in c]]></category>
		<category><![CDATA[decision making and looping in c]]></category>
		<category><![CDATA[decision making statement program]]></category>
		<category><![CDATA[decision making statements]]></category>
		<category><![CDATA[decision making statements in c]]></category>
		<category><![CDATA[decision making statements in c with examples]]></category>
		<category><![CDATA[if else statement in c]]></category>
		<category><![CDATA[if statement in c]]></category>
		<category><![CDATA[looping statements in c]]></category>
		<category><![CDATA[switch statement in c++]]></category>
		<category><![CDATA[TCS Ninja Coding Questions with Answers | TCS Ninja Coding Questions 2021 | TCS Ninja Programming MCQ Questions]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=2648</guid>

					<description><![CDATA[Answer : A. Decision making]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<p class="color-pink">The construct “if (condition) then A else B” is used for which of the following purposes ?</p>
<div class="row">
<div class="col-sm-6">
<p>A. Decision making</p>
</div>
<div class="col-sm-6">
<p>B. Iteration</p>
</div>
<div class="col-sm-6">
<p>C. Recursion</p>
</div>
<div class="col-sm-6">
<p>D. Object oriented programming</p>
</div>
</div>
</div>
</div>
<h3 id="answer-a-decision-making"><b>Answer : </b>A. Decision making</h3>
<div class="subheading">
<h2 id="explanation">Explanation:</h2>
</div>
<div class="subheading">
<h2 id="if-else-for-decision-making" class="color-green">If-Else for Decision Making:</h2>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li>The if statement alone tells us that if a condition is true it will execute a block of statements and if the condition is false it won’t. But what if we want to do something else if the condition is false. Here comes the else statement. We can use the else statement with if statement to execute a block of code when the condition is false.</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/recursion-and-iteration/the-construct-if-condition-then-a-else-b-is-used-for-which-of-the-following-purposes/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<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…while loop in C programming checks its condition at the bottom of the loop.</li>
<li>A do…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>
		<item>
		<title>What is the output of this C code ? &#124; Recursive Function in C Program</title>
		<link>https://www.wikitechy.com/interview-questions/recursion-and-iteration/what-is-the-output-of-this-c-code-recursive-function-in-c-program/</link>
					<comments>https://www.wikitechy.com/interview-questions/recursion-and-iteration/what-is-the-output-of-this-c-code-recursive-function-in-c-program/#respond</comments>
		
		<dc:creator><![CDATA[Editor]]></dc:creator>
		<pubDate>Sat, 28 Aug 2021 17:14:35 +0000</pubDate>
				<category><![CDATA[Recursion and Iteration]]></category>
		<category><![CDATA[algorithm for switch case in c]]></category>
		<category><![CDATA[c program for switch case using function]]></category>
		<category><![CDATA[C programming switch case examples]]></category>
		<category><![CDATA[C programming switch case Examples/Programs]]></category>
		<category><![CDATA[C programming switch case Programs]]></category>
		<category><![CDATA[C switch case Statement]]></category>
		<category><![CDATA[How does the switch and break work in C]]></category>
		<category><![CDATA[Java switch Statement]]></category>
		<category><![CDATA[Program for Switch Case with and without break statement]]></category>
		<category><![CDATA[switch case]]></category>
		<category><![CDATA[switch case c]]></category>
		<category><![CDATA[switch case example in c]]></category>
		<category><![CDATA[switch case exercises in c]]></category>
		<category><![CDATA[switch case in c programming examples]]></category>
		<category><![CDATA[switch case in c programming questions]]></category>
		<category><![CDATA[switch case program in c]]></category>
		<category><![CDATA[switch case statement in C Programming]]></category>
		<category><![CDATA[switch statement in c++]]></category>
		<category><![CDATA[TCS Ninja Coding Questions with Answers | TCS Ninja Coding Questions 2021 | TCS Ninja Programming MCQ Questions]]></category>
		<category><![CDATA[What is switch condition]]></category>
		<category><![CDATA[while c programming]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=2646</guid>

					<description><![CDATA[Answer : D. Error]]></description>
										<content:encoded><![CDATA[<div class="TextHeading">
<div class="hddn">
<p class="color-pink">What is the output of this C code ?</p>
<div class="CodeContent">
<div class="hddn">
<figure class="highlight">
<pre><code class="hljs bash" data-lang=""><span class="nt">Function <span class="hljs-function"><span class="hljs-title">main</span></span>() {
  <span class="hljs-built_in">integer</span> a = <span class="hljs-number">5</span>, b = <span class="hljs-number">7</span>
  Switch(a) {
    Case <span class="hljs-number">5</span>: <span class="hljs-built_in">print</span> <span class="hljs-string">"I am 5"</span>
    Break
    Case b: <span class="hljs-built_in">print</span> <span class="hljs-string">"I am not 5"</span>
    Break
    Default: <span class="hljs-built_in">print</span> <span class="hljs-string">"I am different"</span>
  }
}
</span></code></pre>
</figure>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<p>A. I am 5</p>
</div>
<div class="col-sm-4">
<p>B. I am not 5</p>
</div>
<div class="col-sm-4">
<p>C. I am different</p>
</div>
<div class="col-sm-4">
<p>D. Error</p>
</div>
<div class="col-sm-4">
<p>E. None of these</p>
</div>
</div>
</div>
</div>
<h3 id="answer-d-error"><b>Answer : </b>D. Error</h3>
<div class="subheading">
<h2 id="explanation">Explanation:</h2>
</div>
<div class="Content">
<div class="hddn">
<ul>
<li>Break doesn’t have “;” (Semi Colon missing in break command)</li>
</ul>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/recursion-and-iteration/what-is-the-output-of-this-c-code-recursive-function-in-c-program/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
