<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7700871941293290768</atom:id><lastBuildDate>Wed, 28 Aug 2024 22:49:22 +0000</lastBuildDate><category>array</category><category>printf</category><category>Precedence</category><category>pointers</category><category>Operators</category><category>strings</category><category>structure</category><category>loops</category><category>Library</category><category>Parentheses</category><category>Pre-Processor</category><category>recursion</category><category>sizeof</category><category>Arithmetic Operators</category><category>C Functions</category><category>Unary Operators</category><category>bitwise operators</category><category>file</category><category>printf formats</category><category>scanf</category><category>static variables</category><category>switch case</category><category>C Strings</category><category>Compilation</category><category>Conditional Statements</category><category>Identifiers</category><category>Initialization</category><category>Linked List</category><category>Linker</category><category>Pointer Arithmetic</category><category>Relational Operators</category><category>Statement</category><category>Ternary Operator</category><category>Union</category><category>ascii chart</category><category>base conversion</category><category>extern</category><category>float</category><category>stack</category><title>C Programming Tricks, Test, Interview Questions</title><description>Learn C programming skills, test your c skill. C Interview questions.</description><link>http://c-programming-tricks.blogspot.com/</link><managingEditor>noreply@blogger.com (Vikram)</managingEditor><generator>Blogger</generator><openSearch:totalResults>94</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-1711652262930285179</guid><pubDate>Tue, 11 May 2010 10:48:00 +0000</pubDate><atom:updated>2011-12-09T08:00:27.430-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">structure</category><title>Structure Comparison</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
) int main()&lt;br /&gt;
{&lt;br /&gt;
struct emp&lt;br /&gt;
{&lt;br /&gt;
char name[20];&lt;br /&gt;
int empno;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct emp e1 = {&quot;harrypotter&quot;, 1311};&lt;br /&gt;
&lt;br /&gt;
struct emp e2 = e1;&lt;br /&gt;
&lt;br /&gt;
if (e1==e2)&lt;br /&gt;
printf (&quot;e1 and e2 are same&quot;);&lt;br /&gt;
else&lt;br /&gt;
printf (&quot;e1 and e2 are different&quot;);&lt;br /&gt;
&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
Choice:&lt;br /&gt;
a)e1 and e2 are same&lt;br /&gt;
b)e1 and e2 are different&lt;br /&gt;
c)Error&lt;br /&gt;
d)Segmentation fault&lt;br /&gt;
&lt;br /&gt;
&lt;script language=&quot;JavaScript&quot; type=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS4(&#39;c&#39;);
//--&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/structure-comparison.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-4121082698739454407</guid><pubDate>Mon, 15 Feb 2010 11:14:00 +0000</pubDate><atom:updated>2010-02-15T03:14:41.810-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Compilation</category><title>What is the output of following program?</title><description>2) void squared(void *nbr)&lt;br /&gt;
{&lt;br /&gt;
 *nbr *= *nbr;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
 int a = 2;&lt;br /&gt;
 squared((void *)a);&lt;br /&gt;
 return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Choice:&lt;br /&gt;
 a)Error&lt;br /&gt;
 b)4&lt;br /&gt;
 c)4 with warning&lt;br /&gt;
 d)2&lt;br /&gt;
 e)Segmentation Fault&lt;br /&gt;
&lt;br /&gt;
&lt;script language=&quot;JavaScript&quot; type=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS5(&#39;a&#39;);
//--&gt;
&lt;/script&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/what-is-output-of-following-program_15.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-7591950852443231839</guid><pubDate>Mon, 15 Feb 2010 11:10:00 +0000</pubDate><atom:updated>2010-02-15T03:10:31.448-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Pre-Processor</category><title>C Preprocessor Question</title><description>#define PRINT printout&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    printf(&quot;PRINT&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Choice:&lt;br /&gt;
 a)error&lt;br /&gt;
 b)PRINT &lt;br /&gt;
 c)printout&lt;br /&gt;
 d)no output&lt;br /&gt;
&lt;br /&gt;
&lt;script language=&quot;JavaScript&quot; type=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS4(&#39;b&#39;);
//--&gt;
&lt;/script&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/c-preprocessor-question.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-7582763705289262218</guid><pubDate>Wed, 10 Feb 2010 08:35:00 +0000</pubDate><atom:updated>2010-02-10T00:35:22.497-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">bitwise operators</category><title>What does the operation shown below produce?</title><description>11 ^ 5 &lt;br /&gt;
&lt;br /&gt;
a) 1 &lt;br /&gt;
b) 6 &lt;br /&gt;
c) 8 &lt;br /&gt;
d) 14&lt;br /&gt;
e) 15&lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS5(&#39;d&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/what-does-operation-shown-below-produce.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-5959341649557193384</guid><pubDate>Wed, 10 Feb 2010 08:33:00 +0000</pubDate><atom:updated>2010-02-10T00:33:22.921-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">pointers</category><title>Which of the following is the correct way to increment the variable &quot;ptr&quot;?</title><description>a) ptr = ptr + sizeof(myStruct); [Ans]&lt;br /&gt;
b) ++(int*)ptr; &lt;br /&gt;
c) ptr = ptr + sizeof(myArray); &lt;br /&gt;
d) increment(ptr); &lt;br /&gt;
e) ptr = ptr + sizeof(ptr); &lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS5(&#39;b&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/which-of-following-is-correct-way-to.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-5860151678062375840</guid><pubDate>Wed, 10 Feb 2010 08:25:00 +0000</pubDate><atom:updated>2010-02-10T00:25:45.210-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Precedence</category><title>What number will z in the sample code contain?</title><description>int z,x=5,y=-10,a=4,b=2; &lt;br /&gt;
  z = x++ - --y * b / a;&lt;br /&gt;
&lt;br /&gt;
   a) 5 &lt;br /&gt;
   b) 6&lt;br /&gt;
   c) 10&lt;br /&gt;
   d) 11 &lt;br /&gt;
   e) 12&lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS5(&#39;c&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/what-number-will-z-in-sample-code.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-5208488106959707418</guid><pubDate>Wed, 10 Feb 2010 08:22:00 +0000</pubDate><atom:updated>2010-02-10T00:25:59.402-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">stack</category><title>Understanding Stack and Queue</title><description>The five items: A, B, C, D and E are pushed in a stack,one after the other starting from A. The stack is popped four times and each element is inserted in a queue. Then two elements are deleted from the queue and pushed back on the stack. Now one item is popped from the stack.&lt;br /&gt;
The popped item is&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
a) A &lt;br /&gt;
b) B &lt;br /&gt;
c) C &lt;br /&gt;
d) D &lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS4(&#39;d&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/stack.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-7883509105806610860</guid><pubDate>Wed, 10 Feb 2010 08:18:00 +0000</pubDate><atom:updated>2010-02-10T00:26:15.339-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">file</category><title>fputs function is used to ?</title><description>i. write characters to a file&lt;br /&gt;
ii. takes 2 parameters&lt;br /&gt;
iii. returns a character&lt;br /&gt;
iv. requires a file pointer&lt;br /&gt;
&lt;br /&gt;
a) all are true &lt;br /&gt;
b) all are false &lt;br /&gt;
c) only i and ii are true &lt;br /&gt;
d) only i,ii and iv are true &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS4(&#39;d&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/fputs-function-is-used-to.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-5763903738155730785</guid><pubDate>Wed, 10 Feb 2010 08:15:00 +0000</pubDate><atom:updated>2010-02-10T00:15:48.811-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">structure</category><title>What is the output of this program?</title><description>main() &lt;br /&gt;
   { &lt;br /&gt;
    struct &lt;br /&gt;
    { &lt;br /&gt;
     int i; &lt;br /&gt;
    }xyz; &lt;br /&gt;
    (*xyz)-&gt;i=10; &lt;br /&gt;
    printf(&quot;%d&quot;,xyz.i); &lt;br /&gt;
   } &lt;br /&gt;
&lt;br /&gt;
    a) program will not compile &lt;br /&gt;
    b) 10 &lt;br /&gt;
    c) god only knows &lt;br /&gt;
    d) address of i&lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS4(&#39;a&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/what-is-output-of-this-program.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-7112333991941083924</guid><pubDate>Mon, 08 Feb 2010 11:24:00 +0000</pubDate><atom:updated>2010-02-10T00:26:59.051-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Pre-Processor</category><title>What is the output of following programme ?</title><description># include&lt;stdio.h&gt;&lt;br /&gt;
# define a 10 &lt;br /&gt;
main() &lt;br /&gt;
{ &lt;br /&gt;
printf(&quot;%d..&quot;,a); &lt;br /&gt;
foo(); &lt;br /&gt;
printf(&quot;%d&quot;,a); &lt;br /&gt;
} &lt;br /&gt;
void foo() &lt;br /&gt;
{ &lt;br /&gt;
#undef a &lt;br /&gt;
#define a 50 &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
a) 10..10 &lt;br /&gt;
b) 10..50 &lt;br /&gt;
c) Error &lt;br /&gt;
d) 0&lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS4(&#39;a&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/what-is-output-of-following-programme.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-7537902320732226784</guid><pubDate>Mon, 08 Feb 2010 11:12:00 +0000</pubDate><atom:updated>2010-02-08T03:16:45.990-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">array</category><title>What does the following program print?</title><description>int a[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};&lt;br /&gt;
&lt;br /&gt;
main()&lt;br /&gt;
{&lt;br /&gt;
int i; &lt;br /&gt;
for(i = 0; i &amp;lt; 3; i++)&lt;br /&gt;
&amp;nbsp;printf(&quot;%d%d%d&quot;, a[i][2-i], *a[i], *(*(a+i)+i));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;a) 3 1 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; 5 4 5&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; 7 7 9&lt;br /&gt;
&amp;nbsp;b) 7 1 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;5 4 5&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;3 7 9&lt;br /&gt;
&amp;nbsp;c) 3 1 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;5 4 7&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;7 7 9&lt;br /&gt;
&amp;nbsp;d) 3 5 7&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;1 4 7&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;1 7 9 &lt;br /&gt;
&lt;br /&gt;
&lt;script language=&quot;JavaScript&quot; type=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS4(&#39;a&#39;);
//--&gt;
&lt;/script&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/what-does-following-program-print.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-1000662946616219795</guid><pubDate>Mon, 08 Feb 2010 11:01:00 +0000</pubDate><atom:updated>2010-02-08T03:01:22.624-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">printf formats</category><title>The output of printf(&quot;%u&quot;, -1) is</title><description>a) -1   &lt;br /&gt;
b) Minimum int value   &lt;br /&gt;
c) Maximum int value   &lt;br /&gt;
d) Error message&lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS4(&#39;c&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/output-of-printfu-1-is.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-3981385564907147024</guid><pubDate>Mon, 08 Feb 2010 10:52:00 +0000</pubDate><atom:updated>2010-02-08T02:52:39.492-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">printf</category><title>The printf() function retunes which value when an error occurs?</title><description>a) Positive value   &lt;br /&gt;
b) Zero   &lt;br /&gt;
c) Negative value   &lt;br /&gt;
d) None of these&lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS4(&#39;c&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/printf-function-retunes-which-value.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-4713119564967228223</guid><pubDate>Sun, 10 Jan 2010 09:16:00 +0000</pubDate><atom:updated>2010-02-10T01:18:59.120-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">structure</category><title>What does the following program print?</title><description>#include &lt;stdio.h&gt;&lt;br /&gt;
&lt;br /&gt;
void main()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
static struct S1&lt;br /&gt;
{&lt;br /&gt;
char c[4], *s;&lt;br /&gt;
} s1 = {&quot;abc&quot;, &quot;def&quot;};&lt;br /&gt;
&lt;br /&gt;
printf(&quot;%c %c\n&quot;, s1.c[0], *s1.s);&lt;br /&gt;
printf(&quot;%s %s&quot;, s1.c, s1.s);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
a) Compiler error&lt;br /&gt;
&lt;br /&gt;
b) a def&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;abc def&lt;br /&gt;
&lt;br /&gt;
c) a d&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;abc def&lt;br /&gt;
&lt;br /&gt;
d) a d&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;a def&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script language=&quot;JavaScript&quot; type=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS4(&#39;c&#39;);
//--&gt;
&lt;/script&gt;&lt;/stdio.h&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/what-does-following-program-print_10.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-7260456161799432294</guid><pubDate>Sun, 10 Jan 2010 09:11:00 +0000</pubDate><atom:updated>2010-02-10T01:11:30.920-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">printf formats</category><title>What is the output of following program?</title><description>#include &lt;stdio.h&gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
printf(&quot;%c\n&quot;, &#39;1&#39; + 1);&lt;br /&gt;
return EXIT_SUCCESS;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
a) ASCII value of &#39;1&#39; is required to find out the answer&lt;br /&gt;
b) 2&lt;br /&gt;
c) 50&lt;br /&gt;
d) Syntax Error&lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS4(&#39;b&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/what-is-output-of-following-program.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-1728917275849036519</guid><pubDate>Sun, 10 Jan 2010 09:07:00 +0000</pubDate><atom:updated>2010-02-10T01:08:22.485-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">static variables</category><title></title><description>#include &lt;stdio.h&gt; &lt;br /&gt;
void func() &lt;br /&gt;
{ &lt;br /&gt;
int x = 0; &lt;br /&gt;
static int y = 0; &lt;br /&gt;
x++; y++; &lt;br /&gt;
printf( &quot;%d -- %d\n&quot;, x, y ); &lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
int main() &lt;br /&gt;
{ &lt;br /&gt;
func(); &lt;br /&gt;
func(); &lt;br /&gt;
return 0; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
What will the code above print when it is executed? &lt;br /&gt;
&lt;br /&gt;
a) 1 -- 1 &lt;br /&gt;
1 -- 1&lt;br /&gt;
b) 1 -- 1 &lt;br /&gt;
2 -- 1&lt;br /&gt;
c) 1 -- 1 &lt;br /&gt;
2 -- 2&lt;br /&gt;
d) 1 -- 0 &lt;br /&gt;
1 -- 0 &lt;br /&gt;
e) 1 -- 1 &lt;br /&gt;
1 -- 2&lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS5(&#39;e&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/include-void-func-int-x-0-static-int-y.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-1575407750773772466</guid><pubDate>Sun, 10 Jan 2010 09:03:00 +0000</pubDate><atom:updated>2010-02-10T01:05:39.429-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">pointers</category><title>Which one of the following statements could replace the ???? in the code above to cause the string 1-2-3-10-5- to be printed when the code is executed?</title><description>int x[] = {1, 2, 3, 4, 5}; &lt;br /&gt;
    int u; &lt;br /&gt;
    int *ptr = x; &lt;br /&gt;
    ???? &lt;br /&gt;
    for( u = 0; u &lt; 5; u++ )
    {
  printf(&quot;%d-&quot;, x[u]); 
    }
    printf( &quot;\n&quot; ); 

a) *ptr + 3 = 10; 
b) *ptr[ 3 ] = 10; 
c) *(ptr + 3) = 10;
d) (*ptr)[ 3 ] = 10; 
e) *(ptr[ 3 ]) = 10;

&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;&lt;br /&gt;
&lt;!--
writeJS5(&#39;c&#39;);
//--&gt;&lt;br /&gt;
&lt;/SCRIPT&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS5(&#39;a&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/01/which-one-of-following-statements-could.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-4603327911438531735</guid><pubDate>Sun, 10 Jan 2010 09:01:00 +0000</pubDate><atom:updated>2010-02-10T01:01:57.460-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">recursion</category><title>With what do you replace the ???? to make the function shown below return the correct answer?</title><description>long factorial (long x) &lt;br /&gt;
{ &lt;br /&gt;
????&lt;br /&gt;
return x * factorial(x - 1); &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
a) if (x == 0) return 0; &lt;br /&gt;
b) return 1; &lt;br /&gt;
c) if (x &gt;= 2) return 2; &lt;br /&gt;
d) if (x == 0) return 1; &lt;br /&gt;
e) if (x &lt;= 1) return 1;


&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;&lt;br /&gt;
&lt;!--
writeJS5(&#39;d&#39;);
//--&gt;&lt;br /&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/with-what-do-you-replace-to-make.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-8743886341686623335</guid><pubDate>Sun, 10 Jan 2010 08:54:00 +0000</pubDate><atom:updated>2010-02-10T00:56:09.250-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">array</category><title>How many bytes are allocated by the definition below?</title><description>char txt [20] = &quot;Hello world!\0&quot;; &lt;br /&gt;
&lt;br /&gt;
a) 11 bytes &lt;br /&gt;
b) 12 bytes &lt;br /&gt;
c) 13 bytes &lt;br /&gt;
d) 20 bytes&lt;br /&gt;
e) 21 bytes &lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS5(&#39;d&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/01/how-many-bytes-are-allocated-by.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-4795117938555708807</guid><pubDate>Sun, 10 Jan 2010 08:51:00 +0000</pubDate><atom:updated>2010-02-10T00:52:13.247-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">pointers</category><title>In terms of code generation, how do the two definitions of buf, both presented above, differ?</title><description>char buf [] = &quot;Hello world!&quot;; &lt;br /&gt;
char * buf = &quot;Hello world!&quot;;&lt;br /&gt;
&lt;br /&gt;
a) The first definition certainly allows the contents of buf to be safely modified at runtime; the second definition does not&lt;br /&gt;
b) The first definition is not suitable for usage as an argument to a function call; the second definition is&lt;br /&gt;
c) The first definition is not legal because it does not indicate the size of the array to be allocated; the second definition is legal&lt;br /&gt;
d) They do not differ -- they are functionally equivalent&lt;br /&gt;
e) The first definition does not allocate enough space for a terminating NUL-character, nor does it append one; the second definition does&lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS5(&#39;a&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/in-terms-of-code-generation-how-do-two.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-4384244544569501949</guid><pubDate>Sun, 10 Jan 2010 08:45:00 +0000</pubDate><atom:updated>2010-02-10T00:47:12.072-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">pointers</category><title>Which one of the following will declare a pointer to an integer at address 0x200 in memory?</title><description>a) int *x; &lt;br /&gt;
*x = 0x200;&lt;br /&gt;
b) int *x = &amp;0x200; &lt;br /&gt;
c) int *x = *0x200; &lt;br /&gt;
d) int *x = 0x200; &lt;br /&gt;
e) int *x( &amp;0x200 ); &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS5(&#39;d&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/which-one-of-following-will-declare.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-840537059244046194</guid><pubDate>Sun, 10 Jan 2010 08:44:00 +0000</pubDate><atom:updated>2010-02-10T00:44:28.635-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Pointer Arithmetic</category><title>What string does ptr point to in the sample code below?</title><description>char *ptr; &lt;br /&gt;
char myString[] = &quot;abcdefg&quot;; &lt;br /&gt;
ptr = myString; &lt;br /&gt;
ptr += 5;&lt;br /&gt;
&lt;br /&gt;
a) fg&lt;br /&gt;
b) efg&lt;br /&gt;
c) defg &lt;br /&gt;
d) cdefg &lt;br /&gt;
e) None of the above&lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS5(&#39;a&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/what-string-does-ptr-point-to-in-sample.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-311303772613115603</guid><pubDate>Sun, 10 Jan 2010 08:39:00 +0000</pubDate><atom:updated>2010-02-10T00:39:22.140-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Conditional Statements</category><title>What value will x contain when the sample code below is executed?</title><description>int x = 3; &lt;br /&gt;
if( x == 2 );&lt;br /&gt;
x = 0; &lt;br /&gt;
if( x == 3 )&lt;br /&gt;
x++; &lt;br /&gt;
else x += 2;&lt;br /&gt;
&lt;br /&gt;
a) 1 &lt;br /&gt;
b) 2&lt;br /&gt;
c) 3 &lt;br /&gt;
d) 4 &lt;br /&gt;
e) 5 &lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS5(&#39;b&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2010/02/what-value-will-x-contain-when-sample.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-1812691583172935328</guid><pubDate>Tue, 15 Dec 2009 11:15:00 +0000</pubDate><atom:updated>2010-02-15T03:18:48.673-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Ternary Operator</category><title>Ternary Operator</title><description>What is the output.&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
 int i=10,j=20;&lt;br /&gt;
      j = i, j?(i,j)?i:j:j;&lt;br /&gt;
 printf(&quot;%d %d&quot;,i,j);&lt;br /&gt;
}&lt;br /&gt;
Choice:&lt;br /&gt;
 a)10 10&lt;br /&gt;
 b)20 20&lt;br /&gt;
 c)10 11&lt;br /&gt;
 d)11 10&lt;br /&gt;
 e)10 20&lt;br /&gt;
&lt;br /&gt;
&lt;script language=&quot;JavaScript&quot; type=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS5(&#39;a&#39;);
//--&gt;
&lt;/script&gt;</description><link>http://c-programming-tricks.blogspot.com/2009/12/ternary-operator.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7700871941293290768.post-6637494582555741258</guid><pubDate>Mon, 08 Jun 2009 14:15:00 +0000</pubDate><atom:updated>2009-06-08T07:15:44.426-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Precedence</category><title>What is the output of following programme ?</title><description>main()&lt;br /&gt;
{&lt;br /&gt;
       int a=2,*f1,*f2;&lt;br /&gt;
       f1=f2=&amp;a;&lt;br /&gt;
       *f2+=*f2+=a+=2.5;&lt;br /&gt;
       *f1+=*f1+=a+=2.5;&lt;br /&gt;
     printf(&quot;\n%d %d %d&quot;,a,*f1,*f2);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Choice&lt;br /&gt;
a) 18,18,18 &lt;br /&gt;
b) 10,10,10 &lt;br /&gt;
c) 72,72,72 &lt;br /&gt;
d) 64,64,64&lt;br /&gt;
e) 26,26,26&lt;br /&gt;
&lt;br /&gt;
&lt;script LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;TEXT/JAVASCRIPT&quot;&gt;
&lt;!--
writeJS5(&#39;e&#39;);
//--&gt;
&lt;/SCRIPT&gt;</description><link>http://c-programming-tricks.blogspot.com/2009/06/what-is-output-of-following-programme.html</link><author>noreply@blogger.com (Vikram)</author><thr:total>2</thr:total></item></channel></rss>