<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://gatecse.in/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Starry+Starr</id>
		<title>GATECSE - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://gatecse.in/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Starry+Starr"/>
		<link rel="alternate" type="text/html" href="https://gatecse.in/wiki/Special:Contributions/Starry_Starr"/>
		<updated>2026-04-16T15:35:17Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.0</generator>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Combinatory_Notes&amp;diff=5095</id>
		<title>Category:Combinatory Notes</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Combinatory_Notes&amp;diff=5095"/>
				<updated>2015-05-07T01:01:48Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: Created page with &amp;quot;Category:Combinatory&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Combinatory]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Number_of_Binary_trees_possible_with_n_nodes&amp;diff=5094</id>
		<title>Number of Binary trees possible with n nodes</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Number_of_Binary_trees_possible_with_n_nodes&amp;diff=5094"/>
				<updated>2015-05-07T01:01:25Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;metadesc&amp;gt;What&amp;#039;s the number of distinct binary trees possible with n labeled nodes? &lt;br /&gt;
What&amp;#039;s the number of distinct binary trees possible with n unlabeled nodes? &lt;br /&gt;
What&amp;#039;s the number of distinct binary trees  structures possible with n nodes? &lt;br /&gt;
What&amp;#039;s the number of distinct binary search trees possible with n nodes? &amp;lt;/metadesc&amp;gt;&lt;br /&gt;
==What&amp;#039;s the no. of distinct binary trees possible with n labeled nodes?==&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
For a binary tree with &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; nodes, the no. of edges is &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt;. So, this problem can be reduced to the no. of ways in which we can make &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; edges from &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices. An edge can be made either as a left child of a node or as a right child. Hence, for &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; nodes, we have &amp;lt;math&amp;gt;2n&amp;lt;/math&amp;gt; possibilities for the first edge, &amp;lt;math&amp;gt;2n-1&amp;lt;/math&amp;gt; for the second edge and so on. Thus, for &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; edges, the total no. of ways &lt;br /&gt;
&lt;br /&gt;
= $2n \times (2n-1) \times (2n-2)\times ....\times (2n - (n - 2))$&lt;br /&gt;
&lt;br /&gt;
= $2n \times (2n-1) \times (2n-2) \times .... \times (n + 2)$&lt;br /&gt;
&lt;br /&gt;
=$ \frac{(2n)!} { (n+1)!}$&lt;br /&gt;
&lt;br /&gt;
==What&amp;#039;s the no. of distinct binary trees possible with n unlabeled nodes? (No. of structurally different binary trees possible with n nodes)==&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
If the nodes are similar (unlabeled), then the no. of distinct binary trees will be the above value divided by the no. of distinct permutations possible for a binary tree structure, which will be $n!$ for a tree with $n$ nodes.&lt;br /&gt;
&lt;br /&gt;
$ \frac{(2n)!} { (n+1)!  n!}$&lt;br /&gt;
&lt;br /&gt;
=$\frac{2nCn}{n+1}$&lt;br /&gt;
&lt;br /&gt;
(This is the $n^{th}$ [http://en.wikipedia.org/wiki/Catalan_number Catalan number])&lt;br /&gt;
&lt;br /&gt;
==What&amp;#039;s the no. of distinct binary search trees possible with n nodes?==&lt;br /&gt;
===Solution===&lt;br /&gt;
Counting the no. of distinct binary search trees possible for n nodes, is similar to counting the no. of distinct binary trees possible for n nodes assuming nodes are unlabeled. Hence, this value will also be &lt;br /&gt;
&lt;br /&gt;
=$\frac{2nCn}{n+1}$ &lt;br /&gt;
&lt;br /&gt;
($n^{th}$ [http://en.wikipedia.org/wiki/Catalan_number Catalan number])&lt;br /&gt;
&lt;br /&gt;
Alternatively, for each valid binary search tree, we can get $n!$ binary trees by permuting the vertices, of which only 1 permutation is a [http://en.wikipedia.org/wiki/Binary_search_tree $BST$]. Hence, the total no. of binary search trees possible with $n$ nodes will be&lt;br /&gt;
&lt;br /&gt;
$\frac{\text{No. of distinct binary trees with $n$ distinct nodes}} {n!}$&lt;br /&gt;
&lt;br /&gt;
= $ \frac{(2n)!} { (n+1)!  n!}$&lt;br /&gt;
&lt;br /&gt;
=$\frac{2nCn}{n+1}$ &lt;br /&gt;
&lt;br /&gt;
($n^{th}$ [http://en.wikipedia.org/wiki/Catalan_number Catalan number])&lt;br /&gt;
&lt;br /&gt;
(We can also use the fact that for a given tree structure, there can be only 1 [http://en.wikipedia.org/wiki/Binary_search_tree $BST$]. Hence, no. of different [http://en.wikipedia.org/wiki/Binary_search_tree $BST$]s with n nodes will be equal to the no. of different binary tree structures possible for n nodes)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Template:FBD}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Combinatory Notes]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Compact Notes for Reference of Understanding]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Probability&amp;diff=5093</id>
		<title>Category:Probability</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Probability&amp;diff=5093"/>
				<updated>2015-05-07T00:59:58Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: Created page with &amp;quot;Category:Engineering Mathematics&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Engineering Mathematics]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Combinatory&amp;diff=5092</id>
		<title>Category:Combinatory</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Combinatory&amp;diff=5092"/>
				<updated>2015-05-07T00:59:24Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: Created page with &amp;quot;Category:Engineering Mathematics&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Engineering Mathematics]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Probability_questions&amp;diff=5091</id>
		<title>Category:Probability questions</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Probability_questions&amp;diff=5091"/>
				<updated>2015-05-07T00:59:06Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Engineering Mathematics questions]]&lt;br /&gt;
[[Category:Probability]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Probability_and_Combinatorics_Notes&amp;diff=5090</id>
		<title>Category:Probability and Combinatorics Notes</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Probability_and_Combinatorics_Notes&amp;diff=5090"/>
				<updated>2015-05-07T00:58:38Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Combinatory]]&lt;br /&gt;
[[Category:Notes &amp;amp; Ebooks for GATE Preparation]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Probability_questions&amp;diff=5089</id>
		<title>Category:Probability questions</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Probability_questions&amp;diff=5089"/>
				<updated>2015-05-07T00:56:16Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Engineering Mathematics questions]]&lt;br /&gt;
[[Category:Probability and Combinatorics]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Mathematics_questions_from_GATE&amp;diff=5088</id>
		<title>Category:Mathematics questions from GATE</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Mathematics_questions_from_GATE&amp;diff=5088"/>
				<updated>2015-05-07T00:56:02Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Engineering Mathematics questions]]&lt;br /&gt;
[[Category: Previous Year GATE Questions Subject-wise]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Linear_Algebra_questions&amp;diff=5087</id>
		<title>Category:Linear Algebra questions</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Linear_Algebra_questions&amp;diff=5087"/>
				<updated>2015-05-07T00:55:47Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Engineering Mathematics questions]]&lt;br /&gt;
[[Category:Linear Algebra]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Calculus_questions&amp;diff=5086</id>
		<title>Category:Calculus questions</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Calculus_questions&amp;diff=5086"/>
				<updated>2015-05-07T00:55:34Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Engineering Mathematics questions]]&lt;br /&gt;
[[Category:Calculus]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Theory_of_Computation&amp;diff=5085</id>
		<title>Category:Theory of Computation</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Theory_of_Computation&amp;diff=5085"/>
				<updated>2015-05-07T00:52:58Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--&lt;br /&gt;
http://gatenotes.wordpress.com/theory-of-computing/--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/playlist?list=PL601FC994BDD963E4 Video lectures  by Shai Simonson]  are the best&lt;br /&gt;
&lt;br /&gt;
Here is the first video from the series&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|HyUK5RAJg1c}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are few terms which you must be familiar with&lt;br /&gt;
&lt;br /&gt;
[http://www.ecst.csuchico.edu/~amk/foo/csci356/notes/ch11/NP2.html NP Complete]&lt;br /&gt;
&lt;br /&gt;
[http://csfundas.wordpress.com/theory-of-computation-2/recursively-enumerable/ Recursively Enumerable Sets]&lt;br /&gt;
&lt;br /&gt;
This post describes about  Computability concepts like  SAT /  NP completeness&lt;br /&gt;
&lt;br /&gt;
P represents the class of problems that can be solved in polynomial time&lt;br /&gt;
&lt;br /&gt;
NP  represents the class of problems whose solutions can be verified in polynomial time&lt;br /&gt;
&lt;br /&gt;
In other words, nondeterministically guess the solution and verify it in polynomial time. The guessing is nondeterministic and verification is polynomial. Thus nondeterministic polynomial (NP) time&lt;br /&gt;
&lt;br /&gt;
If P were equal to NP, there would be amazing consequences. It means every problem verifiable in polynomial time could also be solved in polynomial time, all combinatorial optimizations could be solved in polynomial time. The curse of combinatorial explosions would be gone. Seems unlikely to be true… however NO counterproof (namely P!=NP) has been found.&lt;br /&gt;
&lt;br /&gt;
===SAT problem (introduced by scientist Cook)===&lt;br /&gt;
&lt;br /&gt;
The most important achievement of Cook is to show  that P=NP iff a particular computational problem called SAT is in P.&lt;br /&gt;
&lt;br /&gt;
Cook showed that any problem in NP can be transformed to a corresponding instance of SAT problem in such a way that the original has a solution iff the satisfiability instance has. Moreover, this translation can be done in polynomial time. In other words SAT problem is general enough to capture the structure of any problem in NP. It follows that if we can solve the SAT problem in polynomial time, then we would be able to construct a polynomial time algorithm to solve any problem in NP.&lt;br /&gt;
&lt;br /&gt;
The SAT problem is one archetypal problem. In the field of combinatorial optimization , there is one archetypal problem (integer linear programming) and many combinatorial problems can be stated in terms of ILP.&lt;br /&gt;
&lt;br /&gt;
===NP Completeness (introduced by Prof. Karp)===&lt;br /&gt;
&lt;br /&gt;
Karp decided to investigate whether certain classic combinatorial problems long believed to be intractable were also archetypal in Cook’s sense. Karp called them “polynomial complete” (later known as NP complete)&lt;br /&gt;
&lt;br /&gt;
A problem is said to be NP complete if it lies in the class NP and every problem in NP is polynomially reducible to it. Thus by Cook’s theorem the SAT problem is NP complete. To show a given problem in NP is NP complete it if sufficient to show that some problem already known to be NP complete is polynomial time reducible to it. By constructing a series of polynomial reductions, Karp showed that most problems were NP complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--[{{fullurl:{{FULLPAGENAMEE}}|action=pdfbook&amp;amp;format=html}} download this selection of articles as a PDF book]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:GATE Subjects in CSE]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:GATE Subjects in CSE]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Graph_Theory_questions_from_GATE&amp;diff=5083</id>
		<title>Category:Graph Theory questions from GATE</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Graph_Theory_questions_from_GATE&amp;diff=5083"/>
				<updated>2015-05-07T00:48:05Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Graph Theory questions]]&lt;br /&gt;
[[Category:Engineering Mathematics questions]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Engineering_Mathematics_questions&amp;diff=5082</id>
		<title>Category:Engineering Mathematics questions</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Engineering_Mathematics_questions&amp;diff=5082"/>
				<updated>2015-05-07T00:47:14Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: Created page with &amp;quot;Category:Engineering Mathematics Category:Previous Year GATE Questions Subject-wise&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Engineering Mathematics]]&lt;br /&gt;
[[Category:Previous Year GATE Questions Subject-wise]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Graph_Theory_questions_from_GATE&amp;diff=5081</id>
		<title>Category:Graph Theory questions from GATE</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Graph_Theory_questions_from_GATE&amp;diff=5081"/>
				<updated>2015-05-07T00:46:41Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Graph Theory questions]]&lt;br /&gt;
[[Category:Previous Year GATE Questions Subject-wise]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Set_Theory_%26_Algebra&amp;diff=5080</id>
		<title>Category:Set Theory &amp; Algebra</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Set_Theory_%26_Algebra&amp;diff=5080"/>
				<updated>2015-05-07T00:45:51Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: Created page with &amp;quot;Category:Engineering Mathematics&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Engineering Mathematics]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Set_Theory_%26_Algebra_questions_from_GATE&amp;diff=5079</id>
		<title>Category:Set Theory &amp; Algebra questions from GATE</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Set_Theory_%26_Algebra_questions_from_GATE&amp;diff=5079"/>
				<updated>2015-05-07T00:45:25Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: Created page with &amp;quot;Category:Set Theory &amp;amp; Algebra Category:Previous Year GATE Questions Subject-wise&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Set Theory &amp;amp; Algebra]]&lt;br /&gt;
[[Category:Previous Year GATE Questions Subject-wise]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Graph_Theory_questions&amp;diff=5078</id>
		<title>Category:Graph Theory questions</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Graph_Theory_questions&amp;diff=5078"/>
				<updated>2015-05-07T00:43:40Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Engineering Mathematics questions]]&lt;br /&gt;
[[Category:Graph Theory]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=GATE2013_q1&amp;diff=5077</id>
		<title>GATE2013 q1</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=GATE2013_q1&amp;diff=5077"/>
				<updated>2015-05-07T00:43:00Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A binary operation $\oplus$ on a set of integers is defined as $x \oplus y = x^{2}+y^{2}$. Which one of the following statements is &amp;#039;&amp;#039;&amp;#039;TRUE&amp;#039;&amp;#039;&amp;#039; about $\oplus$?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;(A) Commutative but not associative&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
(B) Both commutative and associative&lt;br /&gt;
&lt;br /&gt;
(C) Associative but not commutative&lt;br /&gt;
&lt;br /&gt;
(D) Neither commutative nor associative&lt;br /&gt;
&lt;br /&gt;
{{Template:FBD}}&lt;br /&gt;
&lt;br /&gt;
[[Category: GATE2013]]&lt;br /&gt;
[[Category: Set Theory &amp;amp; Algebra questions from GATE]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=GATE2010_q4&amp;diff=5076</id>
		<title>GATE2010 q4</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=GATE2010_q4&amp;diff=5076"/>
				<updated>2015-05-07T00:42:16Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Consider the set S = $\{1, &amp;amp;omega;, &amp;amp;omega;^2\}$, where $\omega$ and $\omega^2$ are cube roots of unity. If $*$&lt;br /&gt;
	denotes the multiplication operation, the structure $(S, *)$ forms&lt;br /&gt;
		&lt;br /&gt;
		&amp;#039;&amp;#039;&amp;#039;(A) A Group&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
		&lt;br /&gt;
		(B) A Ring &lt;br /&gt;
		&lt;br /&gt;
		(C) An integral domain&lt;br /&gt;
		&lt;br /&gt;
		(D) A field&lt;br /&gt;
==={{Template:Author|Happy Mittal|{{mittalweb}} }}===&lt;br /&gt;
We can directly answer this question as &amp;quot;A Group&amp;quot;, because other three options require two operations over structure,&lt;br /&gt;
		 but let us see whether $(S, *)$ satisfies group properties or not.&lt;br /&gt;
		 &amp;lt;ul&amp;gt;&lt;br /&gt;
			 &amp;lt;li&amp;gt;Closure: If we multiply any two elements of $S$, we get one of three elements of $S$, so $S$ is closed over $*$.&amp;lt;/li&amp;gt;&lt;br /&gt;
			 &amp;lt;li&amp;gt;Associativity: multiplication operation is anyway associative.&amp;lt;/li&amp;gt;&lt;br /&gt;
			 &amp;lt;li&amp;gt;Identity element: $1$ is identity element of $S$.&amp;lt;/li&amp;gt;&lt;br /&gt;
			 &amp;lt;li&amp;gt;Inverse element: inverse of $1$ is $1$ because $1 * 1 = 1$, inverse of $&amp;amp;omega;$ is $&amp;amp;omega;^2$, because &lt;br /&gt;
			 $&amp;amp;omega; * &amp;amp;omega;^2 = 1$. Also inverse of $&amp;amp;omega;^2$ is $&amp;amp;omega;$, because $&amp;amp;omega;^2 * &amp;amp;omega; = 1$&amp;lt;/li&amp;gt;&lt;br /&gt;
		 &amp;lt;/ul&amp;gt;&lt;br /&gt;
		 Thus, $S$ satisfies all $4$ properties of group, so it is a group. In fact, $S$ is an abelian group, because it also satisfies commutative&lt;br /&gt;
		  property. &lt;br /&gt;
		 &amp;lt;br&amp;gt;&lt;br /&gt;
		 So, option &amp;lt;b&amp;gt;(A)&amp;lt;/b&amp;gt; is correct.&lt;br /&gt;
&lt;br /&gt;
{{Template:FBD}}&lt;br /&gt;
&lt;br /&gt;
[[Category: GATE2010]]&lt;br /&gt;
[[Category: Set Theory &amp;amp; Algebra questions from GATE]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Sets_and_Relations_questions_from_GATE&amp;diff=5075</id>
		<title>Category:Sets and Relations questions from GATE</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Sets_and_Relations_questions_from_GATE&amp;diff=5075"/>
				<updated>2015-05-07T00:40:26Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Set Theory &amp;amp; Algebra questions]]&lt;br /&gt;
[[Category: Set Theory &amp;amp; Algebra questions from GATE]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Graph_Theory_questions_from_GATE&amp;diff=5074</id>
		<title>Category:Graph Theory questions from GATE</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Graph_Theory_questions_from_GATE&amp;diff=5074"/>
				<updated>2015-05-07T00:39:29Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Graph Theory questions]]&lt;br /&gt;
[[Category: Graph Theory questions from GATE]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Graph_Theory&amp;diff=5073</id>
		<title>Category:Graph Theory</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Graph_Theory&amp;diff=5073"/>
				<updated>2015-05-07T00:38:37Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Engineering Mathematics]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Databases&amp;diff=5071</id>
		<title>Category:Databases</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Databases&amp;diff=5071"/>
				<updated>2015-05-07T00:36:48Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: Created page with &amp;quot;Category:GATE Subjects in CSE&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GATE Subjects in CSE]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Database_Notes&amp;diff=5070</id>
		<title>Category:Database Notes</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Database_Notes&amp;diff=5070"/>
				<updated>2015-05-07T00:36:23Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:DATABASE_SYSTEMS.pdf |Ebook Database Systems]]&lt;br /&gt;
&lt;br /&gt;
[http://www2.cs.siu.edu/~cli/CS430/solution6.pdf Database decomposition examples]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Template:FB}}&lt;br /&gt;
[[Category:Databases]]&lt;br /&gt;
[[Category:Notes &amp;amp; Ebooks for GATE Preparation]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:CO_%26_Architecture&amp;diff=5069</id>
		<title>Category:CO &amp; Architecture</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:CO_%26_Architecture&amp;diff=5069"/>
				<updated>2015-05-07T00:35:25Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: Created page with &amp;quot;Category:GATE Subjects in CSE&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GATE Subjects in CSE]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Optimization&amp;diff=5068</id>
		<title>Optimization</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Optimization&amp;diff=5068"/>
				<updated>2015-05-07T00:34:34Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* [http://www.agner.org/optimize/optimizing_assembly.pdf Agner Optimizing Assembly Code]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Template:FB}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Compilers]]&lt;br /&gt;
[[Category:CO &amp;amp; Architecture]]&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Computer_Architecture_Notes&amp;diff=5067</id>
		<title>Category:Computer Architecture Notes</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Computer_Architecture_Notes&amp;diff=5067"/>
				<updated>2015-05-07T00:34:15Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://iete-elan.ac.in/SolQP/soln/soln_ac07.pdf Questions]&lt;br /&gt;
&lt;br /&gt;
[http://cs.stanford.edu/people/eroberts/courses/soco/projects/risc/pipelining/ Pipelining]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.iastate.edu/~prabhu/Tutorial/PIPELINE/hazards.html Pipeline Hazards]&lt;br /&gt;
&lt;br /&gt;
==Cache memory organization in Processors ==&lt;br /&gt;
[[Cache Memory|Cache Memory]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Notes &amp;amp; Ebooks for GATE Preparation]]&lt;br /&gt;
[[Category: CO &amp;amp; Architecture]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Architecture_questions&amp;diff=5066</id>
		<title>Category:Architecture questions</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Architecture_questions&amp;diff=5066"/>
				<updated>2015-05-07T00:33:59Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:CO &amp;amp; Architecture]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Automata_questions&amp;diff=5065</id>
		<title>Category:Automata questions</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Automata_questions&amp;diff=5065"/>
				<updated>2015-05-07T00:32:28Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Theory of Computation]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Theory_of_Computation&amp;diff=5064</id>
		<title>Category:Theory of Computation</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Theory_of_Computation&amp;diff=5064"/>
				<updated>2015-05-07T00:31:51Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: Created page with &amp;quot;Category:GATE Subjects in CSE&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:GATE Subjects in CSE]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Automata_Doubts&amp;diff=5063</id>
		<title>Automata Doubts</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Automata_Doubts&amp;diff=5063"/>
				<updated>2015-05-07T00:30:28Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==&amp;#039;&amp;#039;&amp;#039;1.&amp;#039;&amp;#039;&amp;#039; If $L$ and $L&amp;#039;$ are both recursively enumerable, then $L$ is recursive. Why?==&lt;br /&gt;
&lt;br /&gt;
==={{Template:Author|Arjun Suresh|{{arjunweb}} }}===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given $L$ is $RE$. So there is a $TM$, which accepts and halts for all words in $L$. &lt;br /&gt;
Now, if $L&amp;#039;$ is $RE$, then there is a $TM$, which accepts and halts for all words not in $L$.&lt;br /&gt;
So, if a word is given (either from $L$ or not from $L$), give it to both those $TM$s. If it is from $L$, the first $TM$ will halt and we say it belongs to $L$. If it is not from $L$, the second one will halt and we say it doesn&amp;#039;t belong to $L$. Thus, $L$ becomes recursive.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;2.&amp;#039;&amp;#039;&amp;#039; CYCLE(L) ={xy | yx is in L,L is regular } ==&lt;br /&gt;
Is this statement true or false ?&lt;br /&gt;
==={{Template:Author|Arjun Suresh|{{arjunweb}} }}===&lt;br /&gt;
&lt;br /&gt;
We have a DFA for L, let it be D and have n states. Now we can make a NFA N for L&amp;#039; as follows:&lt;br /&gt;
Our start state will be the final state of D. For every transition on a symbol s from state x to y in D, we will have a transition from y to x. Further we add the following modification to the DFA:&lt;br /&gt;
For every state of N, we append the part of D till that state (all reachable transitions reaching that state). For example, for the start state in N(the final state in D), we&amp;#039;ll append the whole D as it is. (This would mean every string accepted by D will be accepted by N also). For the below DFA, the appending is shown for state 1  &lt;br /&gt;
&amp;lt;graphviz&amp;gt;&lt;br /&gt;
digraph finite_state_machine {&lt;br /&gt;
	rankdir=LR;&lt;br /&gt;
	size=&amp;quot;8,5&amp;quot;&lt;br /&gt;
	node [shape = doublecircle]; 3;&lt;br /&gt;
	node [shape = circle];&lt;br /&gt;
	0 -&amp;gt; 1 [ label = &amp;quot;a&amp;quot; ];&lt;br /&gt;
	1 -&amp;gt; 2 [ label = &amp;quot;a&amp;quot; ];&lt;br /&gt;
	2 -&amp;gt; 3 [ label = &amp;quot;a&amp;quot; ];&lt;br /&gt;
	3 -&amp;gt; 2 [ label = &amp;quot;a&amp;quot; ];&lt;br /&gt;
	0-&amp;gt; 2 [ label = &amp;quot;b&amp;quot; ];&lt;br /&gt;
	1 -&amp;gt; 0 [ label = &amp;quot;b&amp;quot; ];&lt;br /&gt;
	2 -&amp;gt; 2 [ label = &amp;quot;b&amp;quot; ];&lt;br /&gt;
	3 -&amp;gt; 2 [ label = &amp;quot;b&amp;quot; ];&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/graphviz&amp;gt;&lt;br /&gt;
&amp;lt;graphviz&amp;gt;&lt;br /&gt;
digraph finite_state_machine2 {&lt;br /&gt;
	rankdir=LR;&lt;br /&gt;
	size=&amp;quot;8,5&amp;quot;&lt;br /&gt;
	node [shape = doublecircle]; 0,1,2,3;&lt;br /&gt;
	node [shape = circle];&lt;br /&gt;
	0 -&amp;gt; 1 [ label = &amp;quot;a&amp;quot; ];&lt;br /&gt;
       1 -&amp;gt; 0 [ label = &amp;quot;b&amp;quot; ];&lt;br /&gt;
        1 -&amp;gt; 0 [ label = &amp;quot;a&amp;quot; ];&lt;br /&gt;
	2 -&amp;gt; 1 [ label = &amp;quot;a&amp;quot; ];&lt;br /&gt;
	3 -&amp;gt; 2 [ label = &amp;quot;a&amp;quot; ];&lt;br /&gt;
	2 -&amp;gt; 3 [ label = &amp;quot;a&amp;quot; ];&lt;br /&gt;
	2-&amp;gt; 0 [ label = &amp;quot;b&amp;quot; ];&lt;br /&gt;
	0 -&amp;gt; 1 [ label = &amp;quot;b&amp;quot; ];&lt;br /&gt;
	2 -&amp;gt; 2 [ label = &amp;quot;b&amp;quot; ];&lt;br /&gt;
	2 -&amp;gt; 3 [ label = &amp;quot;b&amp;quot; ];&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/graphviz&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
{{Template:FBD}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Theory of Computation]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Automata_Theory_Notes&amp;diff=5062</id>
		<title>Category:Automata Theory Notes</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Automata_Theory_Notes&amp;diff=5062"/>
				<updated>2015-05-07T00:30:05Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[http://www.youtube.com/playlist?list=PL601FC994BDD963E4 Video Lectures by Shai Simonson]&lt;br /&gt;
&lt;br /&gt;
[http://www.ecst.csuchico.edu/~amk/foo/csci356/notes/ch11/NP2.html NP Complete]&lt;br /&gt;
&lt;br /&gt;
[http://www.idt.mdh.se/kurser/cd5560/10_01/examination/KOMPENDIER/Regular/kompendium_eng.pdf Regular expressions, questions and solutions]&lt;br /&gt;
&lt;br /&gt;
[http://csfundas.wordpress.com/theory-of-computation-2/recursively-enumerable Recursively Enumerable Sets]&lt;br /&gt;
&lt;br /&gt;
[http://www.seas.upenn.edu/~cit596/notes/dave/relang0.html Recursively Enumerable Sets]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.cmu.edu/~eugene/teach/auto01/notes/ Notes from CMU]&lt;br /&gt;
&lt;br /&gt;
[http://carlstrom.com/stanford/comps/Automata-and-Formal-Languages.txt Definitions]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.ucr.edu/~jiang/cs150/slides4week7_PDA+EquivToCFG.pdf Push Down Automata]&lt;br /&gt;
&lt;br /&gt;
[http://courses.engr.illinois.edu/cs373/sp2009/lectures/lect_25.pdf Linear Bounded Automata]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.cornell.edu/Courses/cs4820/2013sp/Handouts/TMproblems.pdf Turing Machine Problems]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.cornell.edu/Courses/cs4820/2013sp/Handouts/481TM.pdf Turing Machine Handout]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.toronto.edu/~sacook/csc463h/notes/comp.pdf Reduction examples for decidablility]&lt;br /&gt;
&lt;br /&gt;
[http://theory.stanford.edu/~trevisan/cs154-12/rice.pdf Rice&amp;#039;s theorem, Undecidable and unrecognizable problems on TM]&lt;br /&gt;
&lt;br /&gt;
[http://www.cis.upenn.edu/~jean/gbooks/PCPh04.pdf Undecidable problems about L(CFG)]&lt;br /&gt;
&lt;br /&gt;
[http://courses.engr.illinois.edu/cs373/fa2013/Lectures/lec25.pdf Trivial and Non-trivial properties of L(M)]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.wcupa.edu/~rkline/fcs/grammar-undecidable.html Undecidable Problems]&lt;br /&gt;
&lt;br /&gt;
[http://infolab.stanford.edu/~ullman/ialc/spr10/slides/cfl5.pdf Closure property of CFL]&lt;br /&gt;
&lt;br /&gt;
[http://www.cs.cmu.edu/~avrim/451f11/lectures/lect1108.pdf NP Complete]&lt;br /&gt;
&lt;br /&gt;
[http://channel9.msdn.com/Series/C9-Lectures-Yuri-Gurevich-Introduction-to-Algorithms-and-Computational-Complexity/C9-Lectures-Algorithms-with-Yuri-Gurevich-Introduction-and-Some-History A good lecture going deep into Abstract Machines]&lt;br /&gt;
&lt;br /&gt;
[[NP,_NP_Complete,_NP_Hard| P, NP, NPC and NP-Hard in SImple terms]]&lt;br /&gt;
&lt;br /&gt;
[[Identify_the_class_of_the_language|Identify the class of the language]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Theory of Computation]]&lt;br /&gt;
[[Category: Notes &amp;amp; Ebooks for GATE Preparation]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=C&amp;diff=5061</id>
		<title>C</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=C&amp;diff=5061"/>
				<updated>2015-05-07T00:28:56Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[File:The_C_Programming_Language.pdf]] Dennis Ritchie&lt;br /&gt;
&lt;br /&gt;
[[Category: Programming &amp;amp; Data Structures]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=C_Coding_Questions&amp;diff=5060</id>
		<title>C Coding Questions</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=C_Coding_Questions&amp;diff=5060"/>
				<updated>2015-05-07T00:28:47Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;metadesc&amp;gt;C coding questions for understanding the concepts and features of C language&amp;lt;/metadesc&amp;gt;&lt;br /&gt;
__FORCETOC__&lt;br /&gt;
==C Objective Questions==&lt;br /&gt;
&amp;lt;quiz display=&amp;quot;simple&amp;quot;&amp;gt;&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of this program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot; &amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    char *ptr;&lt;br /&gt;
    char string[] = &amp;quot;How are you?&amp;quot;;&lt;br /&gt;
    ptr = string;&lt;br /&gt;
    ptr += 4;&lt;br /&gt;
    printf(&amp;quot;%s&amp;quot;,ptr);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; How are you?&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; are you?&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; are&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; No output&lt;br /&gt;
||ptr points to the start of the string and hence ptr+4 will point to the 5th char in the string. So, %s will print the characters from ptr+4 till \0 is encountered. (&amp;quot;How are you?&amp;quot; is a string literal and a \0 is implicitly added at the end of it by the compiler)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039; Which of the following will print the value 2 for the above code?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int a[10][20][30] = {0};&lt;br /&gt;
    a[5][2][1] = 2;&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; printf(&amp;quot;%d&amp;quot;,*(((a+5)+2)+1));&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; printf(&amp;quot;%d&amp;quot;,***((a+5)+2)+1);&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; printf(&amp;quot;%d&amp;quot;,*(*(*(a+5)+2)+1));&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; None of these&lt;br /&gt;
||* is the dereferencing operator and to access an element in a 3D array we have to dereference 3 times as in (c) &lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039; What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int a = 5;&lt;br /&gt;
    int b = ++a * a++;&lt;br /&gt;
    printf(&amp;quot;%d &amp;quot;,b);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039;25&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 30&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 36&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; Undefined Behavior&lt;br /&gt;
||In C language if we modify a variable more than once between two sequence points, undefined behavior results (output can be anything on any compiler) and arithmetic operators doesn&amp;#039;t form sequence points&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int a = 5;&lt;br /&gt;
    switch(a)&lt;br /&gt;
    {&lt;br /&gt;
        default:&lt;br /&gt;
        a = 4;&lt;br /&gt;
        case 6:&lt;br /&gt;
            a--;&lt;br /&gt;
        case 5:&lt;br /&gt;
            a = a+1;&lt;br /&gt;
        case 1:&lt;br /&gt;
            a = a-1;&lt;br /&gt;
    }&lt;br /&gt;
    printf(&amp;quot;%d \n&amp;quot;,a);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; 5&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 4&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 3&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; None of these&lt;br /&gt;
||In switch, a jump happens to the matching case (or else to default) and all statements below that are executed unless there is a break.&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int a = 2,b = 5;&lt;br /&gt;
    a = a^b;&lt;br /&gt;
    b = b^a;&lt;br /&gt;
    printf(&amp;quot;%d %d&amp;quot;,a,b);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; 5 2&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 2 5&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 7 7&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; 7 2&lt;br /&gt;
|| ^ does the XOR operation. a^b = 010 ^ 101 = 111 = 7. Now, b^a = 101 ^ 111 = 010 = 2&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int a[][3] = {1, 2, 3, 4, 5, 6};&lt;br /&gt;
    int (*ptr)[3] = a;&lt;br /&gt;
    printf(&amp;quot;%d %d &amp;quot;, (*ptr)[1], (*ptr)[2]);&lt;br /&gt;
    ++ptr;&lt;br /&gt;
    printf(&amp;quot;%d %d\n&amp;quot;, (*ptr)[1], (*ptr)[2]);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; 2 3 5 6&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 2 3 4 5&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 4 5 0 0&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; none of the above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program? &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
void f(char**);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    char *argv[] = { &amp;quot;ab&amp;quot;, &amp;quot;cd&amp;quot;, &amp;quot;ef&amp;quot;, &amp;quot;gh&amp;quot;, &amp;quot;ij&amp;quot;, &amp;quot;kl&amp;quot; };&lt;br /&gt;
    f(argv);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
void f(char **p)&lt;br /&gt;
{&lt;br /&gt;
    char *t;&lt;br /&gt;
    t = (p += sizeof(int))[-1];&lt;br /&gt;
    printf(&amp;quot;%s\n&amp;quot;, t);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; ab&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; cd&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; ef&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; gh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdarg.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int ripple(int n, ...)&lt;br /&gt;
{&lt;br /&gt;
    int i, j, k;&lt;br /&gt;
    va_list p;&lt;br /&gt;
    k = 0;&lt;br /&gt;
    j = 0;&lt;br /&gt;
    va_start(p, n);&lt;br /&gt;
    for (; j &amp;lt; n; ++j)&lt;br /&gt;
    {&lt;br /&gt;
        i = va_arg(p, int);&lt;br /&gt;
        k += i;&lt;br /&gt;
    }&lt;br /&gt;
    va_end(p);&lt;br /&gt;
    &lt;br /&gt;
    return k;&lt;br /&gt;
}&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    printf(&amp;quot;%d\n&amp;quot;, ripple(2, 5, 7));&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; 12&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 5&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 7&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; 15&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int counter(int i)&lt;br /&gt;
{&lt;br /&gt;
    static int count = 0;&lt;br /&gt;
    count = count + i;&lt;br /&gt;
    &lt;br /&gt;
    return count;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int i, j;&lt;br /&gt;
    for (i = 0; i &amp;lt;= 5; i++)&lt;br /&gt;
        j = counter(i);&lt;br /&gt;
    printf(&amp;quot;%d\n&amp;quot;, j);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; 10&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 15&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 6&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; 7&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039; What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    const int x = 5;&lt;br /&gt;
    const int *ptrx;&lt;br /&gt;
    ptrx = &amp;amp;x;&lt;br /&gt;
    *ptrx = 10;&lt;br /&gt;
    printf(&amp;quot;%d\n&amp;quot;, x);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; 5&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 10&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; Compile Error&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; Garbage value&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#define x 4+1&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int i;&lt;br /&gt;
    i = x*x*x;&lt;br /&gt;
    printf(&amp;quot;%d&amp;quot;,i);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; 125&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 13&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 17&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; None of above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    char c=125;&lt;br /&gt;
    c=c+10;&lt;br /&gt;
    printf(&amp;quot;%d&amp;quot;,c);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; 135&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; +INF&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; -121&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; -8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039; What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;	 	&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int i=10;&lt;br /&gt;
    static int x=i;&lt;br /&gt;
    if(x==i)&lt;br /&gt;
        printf(&amp;quot;Equal&amp;quot;);&lt;br /&gt;
    else if(x&amp;gt;i)&lt;br /&gt;
        printf(&amp;quot;Greater&amp;quot;);&lt;br /&gt;
    else&lt;br /&gt;
        printf(&amp;quot;Lesser&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; Equal&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; Greater &lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; Lesser &lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; Compile Error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;Consider the following code segment:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int *f1()&lt;br /&gt;
{&lt;br /&gt;
    int x = 10;&lt;br /&gt;
    return &amp;amp;x;&lt;br /&gt;
}&lt;br /&gt;
int *f2()&lt;br /&gt;
{&lt;br /&gt;
    int *ptr;&lt;br /&gt;
    *ptr = 10;&lt;br /&gt;
    return ptr;&lt;br /&gt;
}&lt;br /&gt;
int *f3()&lt;br /&gt;
{&lt;br /&gt;
    int *ptr;&lt;br /&gt;
    ptr = (int*) malloc(sizeof (*ptr));&lt;br /&gt;
    return ptr;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Which of these functions uses pointers incorrectly?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; f3 only&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; f1 and f3&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; f1 and f2&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; f1, f2, and f3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039; What is the output of the following program? (Assume sizeof (int) is 4)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int i = 3;&lt;br /&gt;
    int j;&lt;br /&gt;
    j = sizeof(++i + ++i);&lt;br /&gt;
    printf(&amp;quot;i=%d j=%d\n&amp;quot;, i, j);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; i=4 j=4&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; i=3 j=4&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; i=5 j=4&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; the behavior is undefined&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039; What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
void f1(int*, int);&lt;br /&gt;
void f2(int*, int);&lt;br /&gt;
void (*p[2])(int*, int);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int a = 3;&lt;br /&gt;
    int b = 5;&lt;br /&gt;
    p[0] = f1;&lt;br /&gt;
    p[1] = f2;&lt;br /&gt;
    p[0](&amp;amp;a, b);&lt;br /&gt;
    printf(&amp;quot;%d %d &amp;quot;, a, b);&lt;br /&gt;
    p[1](&amp;amp;a, b);&lt;br /&gt;
    printf(&amp;quot;%d %d\n&amp;quot;, a, b);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void f1(int *p, int q)&lt;br /&gt;
{&lt;br /&gt;
    int tmp = *p;&lt;br /&gt;
    *p = q;&lt;br /&gt;
    q = tmp;&lt;br /&gt;
}&lt;br /&gt;
void f2(int *p, int q)&lt;br /&gt;
{&lt;br /&gt;
    int tmp = *p;&lt;br /&gt;
    *p = q;&lt;br /&gt;
    q = tmp;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; 5 5 5 5&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 3 5 3 5&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 5 3 3 5&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; none of the above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
void e(int);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int a = 3; &lt;br /&gt;
    e(a);&lt;br /&gt;
    putchar(&amp;#039;\n&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
void e(int n)&lt;br /&gt;
{&lt;br /&gt;
    if (n &amp;gt; 0)&lt;br /&gt;
    {&lt;br /&gt;
        e(--n);&lt;br /&gt;
        printf(&amp;quot;%d &amp;quot;, n);&lt;br /&gt;
        e(--n);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039;0 1 2 0&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 0 1 2 1&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 1 2 0 1&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; 0 2 1 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039; Consider the following code segment:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
typedef int (*test)(float*, float*);&lt;br /&gt;
test tmp;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What is the type of tmp?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; function taking two pointer-to-float arguments and returning pointer to int&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; pointer to int&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; pointer to function taking two pointer-to-float arguments and returning int&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; none of the above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039; What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    char p;&lt;br /&gt;
    char buf[10] = {1, 2, 3, 4, 5, 6, 9, 8};&lt;br /&gt;
    p = (buf + 1)[5];&lt;br /&gt;
    printf(&amp;quot;%d\n&amp;quot;, p);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; 5&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 6&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 9&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; none of the above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    struct node&lt;br /&gt;
    {&lt;br /&gt;
        int a;&lt;br /&gt;
        int b;&lt;br /&gt;
        int c;&lt;br /&gt;
    };&lt;br /&gt;
    struct node s = { 3, 5, 6 };&lt;br /&gt;
    struct node *pt = &amp;amp;s;&lt;br /&gt;
    printf(&amp;quot;%d\n&amp;quot;, *((int*)pt+1));&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; 3&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 5&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 6&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; 7&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main(void)&lt;br /&gt;
{&lt;br /&gt;
    char a[5] = { 1, 2, 3, 4, 5 };&lt;br /&gt;
    char *ptr = (char*)(&amp;amp;a + 1);&lt;br /&gt;
    printf(&amp;quot;%d %d\n&amp;quot;, *(a + 1), *(ptr - 1));&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; Compile Error&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 2 1&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 2 5&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; none of the above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
void foo(int[][3]);&lt;br /&gt;
&lt;br /&gt;
int main(void)&lt;br /&gt;
{&lt;br /&gt;
    int a[3][3] = { {1, 2, 3}, {4, 5, 6}, {7, 8, 9} };&lt;br /&gt;
    foo(a);&lt;br /&gt;
    printf(&amp;quot;%d\n&amp;quot;, a[2][1]);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void foo(int b[][3])&lt;br /&gt;
{&lt;br /&gt;
    ++b;&lt;br /&gt;
    b[1][1] = 9;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; 8&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 9&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 7&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; none of the above&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;Consider the following function:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
int foo(int x, int n)&lt;br /&gt;
{&lt;br /&gt;
    int val = 1;&lt;br /&gt;
    if (n &amp;gt; 0)&lt;br /&gt;
    {&lt;br /&gt;
        if (n % 2 == 1)&lt;br /&gt;
        val *= x;&lt;br /&gt;
        val *= foo(x * x, n / 2);&lt;br /&gt;
    }&lt;br /&gt;
    return val;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What function of x and n is computed by foo?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; $x^n$&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; $x×n$&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; $n^x$&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; none of the above&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int a = 0;&lt;br /&gt;
    switch(a)&lt;br /&gt;
    {&lt;br /&gt;
        default:&lt;br /&gt;
            a = 4;&lt;br /&gt;
        case 6:&lt;br /&gt;
            a--;&lt;br /&gt;
        case 5:&lt;br /&gt;
            a = a+1;&lt;br /&gt;
        case 1:&lt;br /&gt;
            a = a-1;&lt;br /&gt;
    }&lt;br /&gt;
    printf(&amp;quot;%d \n&amp;quot;,a);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}	&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; 5&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 4&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 3&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int a = 2;&lt;br /&gt;
    if(a == (1,2))&lt;br /&gt;
        printf(&amp;quot;Hello&amp;quot;);&lt;br /&gt;
    if(a == 1,2)&lt;br /&gt;
        printf(&amp;quot;World&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; Hello&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; World&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; HelloWorld&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; Compile Error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int a = 1,2;&lt;br /&gt;
    int b = (1,2);&lt;br /&gt;
    if(a == b)&lt;br /&gt;
        printf(&amp;quot;Equal&amp;quot;);&lt;br /&gt;
    else&lt;br /&gt;
        printf(&amp;quot;Not Equal&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; Equal&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; Not Equal&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; Compiler Dependent&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; Compile Error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
void foo(char *);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    char *string = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
    foo(string);&lt;br /&gt;
    printf(&amp;quot;%s&amp;quot;,string);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void foo(char *a)&lt;br /&gt;
{&lt;br /&gt;
    while(*a)&lt;br /&gt;
    {&lt;br /&gt;
        *a += 1;&lt;br /&gt;
        a++;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; Hello&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; Ifmmp&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; Compile Error&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; Segmentation fault&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    char s[] = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
    int i = 0;&lt;br /&gt;
    while(*(s++))&lt;br /&gt;
        i++;&lt;br /&gt;
    printf(&amp;quot;%d&amp;quot;,i);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; Segmentation Fault&lt;br /&gt;
&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; Compile Error &lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 12&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int a = 10;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    fun();&lt;br /&gt;
    fun();&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int fun()&lt;br /&gt;
{&lt;br /&gt;
    static int a = 1;&lt;br /&gt;
    printf(&amp;quot;%d &amp;quot;,a);&lt;br /&gt;
    a++;&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; 1 2&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; 1 1&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; 10 11&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; 10 10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#define crypt(s,t,u,m,p,e,d) m##s##u##t&lt;br /&gt;
#define begin crypt(a,n,i,m,a,t,e)&lt;br /&gt;
int begin() &lt;br /&gt;
{&lt;br /&gt;
    printf(&amp;quot;Hello\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;()&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
+&amp;#039;&amp;#039;&amp;#039;(a)&amp;#039;&amp;#039;&amp;#039; Hello&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(b)&amp;#039;&amp;#039;&amp;#039; Link error&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(c)&amp;#039;&amp;#039;&amp;#039; Segmentation fault&lt;br /&gt;
&lt;br /&gt;
-&amp;#039;&amp;#039;&amp;#039;(d)&amp;#039;&amp;#039;&amp;#039; Compiler error&lt;br /&gt;
&amp;lt;/quiz&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Some Questions==&lt;br /&gt;
&amp;lt;quiz display=&amp;quot;simple&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;Consider the following program:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int a[10][20][30]={0};&lt;br /&gt;
    printf(&amp;quot;%ld&amp;quot;,&amp;amp;a+1 - &amp;amp;a);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What is the output of this program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|type=&amp;quot;{}&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
{ 1 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;Consider the following program:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int a[10][20][30] = {0};&lt;br /&gt;
    int *b = a;&lt;br /&gt;
    int *c = a+1;&lt;br /&gt;
    printf(&amp;quot;%ld&amp;quot;, c-b);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What is the output of this program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
(You may ignore compiler warnings)&lt;br /&gt;
|type=&amp;quot;{}&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
{ 600 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039; What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
int* fun();&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int *a = fun();&lt;br /&gt;
    printf(&amp;quot;%d&amp;quot;,*a);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
int* fun()&lt;br /&gt;
{&lt;br /&gt;
    int *a =(int*) malloc(sizeof(int));&lt;br /&gt;
    *a = 10;&lt;br /&gt;
    return a;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;{}&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
{ 10 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039; What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int *a = fun();&lt;br /&gt;
    printf(&amp;quot;%d&amp;quot;,a);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
int fun()&lt;br /&gt;
{&lt;br /&gt;
    int a = 10;&lt;br /&gt;
    return a;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;{}&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
{ 10 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    char string[] = &amp;quot;Hello&amp;quot;;&lt;br /&gt;
    printf(&amp;quot;%zu %zu&amp;quot;,sizeof(string),strlen(string));&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;{}&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
{ 6 5 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    float a = 0.5;&lt;br /&gt;
    if(a == 0.5)&lt;br /&gt;
        printf(&amp;quot;Yes&amp;quot;);&lt;br /&gt;
    else&lt;br /&gt;
        printf(&amp;quot;No&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;{}&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
{ Yes }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
void foo(char *);&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    char a[100] = {0};&lt;br /&gt;
    printf(&amp;quot;%zu %zu&amp;quot;,sizeof(a),strlen(a));&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;{}&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
{ 100 0 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	 	 	 	&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;What is the output of the following program?&amp;#039;&amp;#039;&amp;#039; (Assume input is 10)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    int a;&lt;br /&gt;
    printf(&amp;quot;%d&amp;quot;,scanf(&amp;quot;%d&amp;quot;,&amp;amp;a));&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;{}&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
{ 1 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039;If the binary equivalent of 5.375 in normalised form is 01000000 10101100 00000000 00000000, what will be the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    float a=5.375;&lt;br /&gt;
    char *p;&lt;br /&gt;
    int i;&lt;br /&gt;
    p = (char*)&amp;amp;a;&lt;br /&gt;
    for(i=0; i&amp;lt;2; i++)&lt;br /&gt;
        printf(&amp;quot;%x&amp;quot;, (unsigned char)(p[i]^p[3-i]));&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;{}&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
{ 40ac }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&amp;#039;&amp;#039;&amp;#039; What is the output of the following program?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    char str[] = {&amp;#039;a&amp;#039;,&amp;#039;b&amp;#039;,&amp;#039;c&amp;#039;,&amp;#039;\0&amp;#039;};&lt;br /&gt;
    str[0] -= 32;&lt;br /&gt;
    printf(&amp;quot;%s&amp;quot;,str);&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|type=&amp;quot;{}&amp;quot;&lt;br /&gt;
/}&lt;br /&gt;
{ Abc }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/quiz&amp;gt;&lt;br /&gt;
==Questions from Datatypes==&lt;br /&gt;
{{:C_Questions_on_Datatypes}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Questions from Pointers==&lt;br /&gt;
{{:C_Questions_on_Pointers}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Some codes==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;1. What is the following function doing?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
int foo(int n)&lt;br /&gt;
{&lt;br /&gt;
    int sum = 0;&lt;br /&gt;
    while(n &amp;gt; 0)&lt;br /&gt;
    {&lt;br /&gt;
        n = n &amp;amp; n-1;&lt;br /&gt;
        sum++;&lt;br /&gt;
    }&lt;br /&gt;
    return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ans&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;2. What is the following function doing?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
int foo(int a, int b)&lt;br /&gt;
{&lt;br /&gt;
    int c = a, d = b;&lt;br /&gt;
    while(a != b)&lt;br /&gt;
    {&lt;br /&gt;
        if(a &amp;lt; b)&lt;br /&gt;
            a = a+c;&lt;br /&gt;
        else&lt;br /&gt;
            b = b+d;&lt;br /&gt;
    }&lt;br /&gt;
    return a;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ans&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;3. What is the following function doing?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
int foo( int a, int b)&lt;br /&gt;
{&lt;br /&gt;
    int c = a-b;&lt;br /&gt;
    c = c&amp;amp;(0x80000000);&lt;br /&gt;
    return (!c)*a +(!!c)*b;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ans&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;4. What is the following function doing?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
unsigned fun(unsigned a, unsigned b)&lt;br /&gt;
{&lt;br /&gt;
    int i;&lt;br /&gt;
    unsigned  j = 0;&lt;br /&gt;
    for(i = 0; i &amp;lt; 32; i++)&lt;br /&gt;
    {&lt;br /&gt;
        j &amp;lt;&amp;lt;= 1;&lt;br /&gt;
        j += !!(a &amp;amp; 0x80000000);&lt;br /&gt;
        a &amp;lt;&amp;lt;= 1;&lt;br /&gt;
        if(j &amp;gt;=b)&lt;br /&gt;
        {&lt;br /&gt;
            j -= b;&lt;br /&gt;
            a++;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return a;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ans&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;5. What is the following function doing?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
unsigned fun(unsigned int a)&lt;br /&gt;
{&lt;br /&gt;
    unsigned int i, x = 0, y = 0, z = 0;&lt;br /&gt;
    for(i = 0; i &amp;lt; 16; i++)&lt;br /&gt;
    {&lt;br /&gt;
       	y &amp;lt;&amp;lt;= 2;&lt;br /&gt;
       	y += !!(a &amp;amp; 0x80000000) &amp;lt;&amp;lt; 1;&lt;br /&gt;
       	y += !!(a &amp;amp; 0x40000000);&lt;br /&gt;
       	a &amp;lt;&amp;lt;= 2;&lt;br /&gt;
       	x = x + (x&amp;amp;1);&lt;br /&gt;
       	x &amp;lt;&amp;lt;= 1;&lt;br /&gt;
       	z &amp;lt;&amp;lt;= 1;&lt;br /&gt;
       	if(x + 1 &amp;lt;= y)&lt;br /&gt;
       	{&lt;br /&gt;
            x++;&lt;br /&gt;
            z++;&lt;br /&gt;
	    y-=x;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    return z;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ans&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	 	 	 	&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;6. Write the code to dynamically allocate a 2-D array of size m x n.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ans&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;7. Declare a pointer to a function accepting an integer and returning void.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ans&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;8. Write the condition so that the below code outputs &amp;lt;math&amp;gt;\unicode{x201C}&amp;lt;/math&amp;gt;Hello World&amp;lt;math&amp;gt;\unicode{x201D}&amp;lt;/math&amp;gt;.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    if(&amp;lt;condition&amp;gt;)&lt;br /&gt;
    {&lt;br /&gt;
	printf(&amp;quot;Hello &amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
	printf(&amp;quot;World\n&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ans&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;9. Write a one line code to check if a number is a power of 2.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ans&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;10. Write a one line code to invert the last four bits of an integer.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ans&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Template:FBD}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming &amp;amp; Data Structures]]&lt;br /&gt;
[[Category:Code]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Algorithms_questions&amp;diff=5059</id>
		<title>Category:Algorithms questions</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Algorithms_questions&amp;diff=5059"/>
				<updated>2015-05-07T00:27:42Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Algorithms]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Graphs&amp;diff=5058</id>
		<title>Category:Graphs</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Graphs&amp;diff=5058"/>
				<updated>2015-05-07T00:27:28Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Code]]&lt;br /&gt;
[[Category:Algorithms]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Sorting&amp;diff=5057</id>
		<title>Category:Sorting</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Sorting&amp;diff=5057"/>
				<updated>2015-05-07T00:27:16Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code]]&lt;br /&gt;
[[Category:Algorithms]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Algorithms&amp;diff=5056</id>
		<title>Category:Algorithms</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Algorithms&amp;diff=5056"/>
				<updated>2015-05-07T00:26:58Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: Created page with &amp;quot;Category: GATE Subjects in CSE&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: GATE Subjects in CSE]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Algorithms_%26_Data_Structures_Notes&amp;diff=5055</id>
		<title>Category:Algorithms &amp; Data Structures Notes</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Algorithms_%26_Data_Structures_Notes&amp;diff=5055"/>
				<updated>2015-05-07T00:26:18Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Notes &amp;amp; Ebooks for GATE Preparation]]&lt;br /&gt;
[[Category: Algorithms]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=Category:Trees&amp;diff=5054</id>
		<title>Category:Trees</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=Category:Trees&amp;diff=5054"/>
				<updated>2015-05-07T00:26:05Z</updated>
		
		<summary type="html">&lt;p&gt;Starry Starr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Algorithms]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Code]]&lt;/div&gt;</summary>
		<author><name>Starry Starr</name></author>	</entry>

	</feed>