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

<channel>
	<title>top interview questions | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/top-interview-questions/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sun, 09 Oct 2011 12:03:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>85. Predict the output or error(s) of the following c code</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-output/85-predict-output-errors-code/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-output/85-predict-output-errors-code/#comments</comments>
		
		<dc:creator><![CDATA[Peter Vegas]]></dc:creator>
		<pubDate>Sun, 09 Oct 2011 12:02:28 +0000</pubDate>
				<category><![CDATA[C - Predict the Output]]></category>
		<category><![CDATA[c interview question]]></category>
		<category><![CDATA[interview questions and answers]]></category>
		<category><![CDATA[questions for an interview]]></category>
		<category><![CDATA[it interview questions]]></category>
		<category><![CDATA[top interview questions]]></category>
		<category><![CDATA[frequently asked interview questions]]></category>
		<category><![CDATA[engineering questions]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1961</guid>

					<description><![CDATA[<pre lang="c" escaped="true" line="1"> main()
{
	int i =0;j=0;
	if(i &#038;& j++)
		printf("%d..%d",i++,j);
	printf("%d..%d,i,j);
}
</pre>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/85-predict-output-errors-code/">85. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1"> main()
{
	int i =0;j=0;
	if(i && j++)
		printf("%d..%d",i++,j);
	printf("%d..%d,i,j);
}
</pre>
<p><a href="javascript:;" onmousedown="if(document.getElementById('mydiv').style.display == 'none'){ document.getElementById('mydiv').style.display = 'block'; }else{ document.getElementById('mydiv').style.display = 'none'; }"><strong>Click here to view the answer</strong></a></p>
<div id="mydiv" style="display:none">
<strong>Answer:</strong><br />
0..0 </p>
<p><strong>Explanation:</strong><br />
The value of i is 0. Since this information is enough to determine the truth value of the boolean expression. So the statement following the if statement is not executed.  The values of i and j remain unchanged and get printed.
</div><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/85-predict-output-errors-code/">85. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c-output/85-predict-output-errors-code/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>84. Predict the output or error(s) of the following c code</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-output/84-predict-output-errors-code/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-output/84-predict-output-errors-code/#respond</comments>
		
		<dc:creator><![CDATA[Peter Vegas]]></dc:creator>
		<pubDate>Sun, 09 Oct 2011 12:02:04 +0000</pubDate>
				<category><![CDATA[C - Predict the Output]]></category>
		<category><![CDATA[frequently asked interview questions]]></category>
		<category><![CDATA[interview questions and answers]]></category>
		<category><![CDATA[questions for an interview]]></category>
		<category><![CDATA[it interview questions]]></category>
		<category><![CDATA[top interview questions]]></category>
		<category><![CDATA[engineering questions]]></category>
		<category><![CDATA[c interview question]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1962</guid>

					<description><![CDATA[<pre lang="c" escaped="true" line="1"> 
#include "stdio.h"
main()
{
	FILE *ptr;
	char i;
	ptr=fopen("zzz.c","r");
	while((i=fgetch(ptr))!=EOF)
		printf("%c",i);
}
</pre>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/84-predict-output-errors-code/">84. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1"> 
#include "stdio.h"
main()
{
	FILE *ptr;
	char i;
	ptr=fopen("zzz.c","r");
	while((i=fgetch(ptr))!=EOF)
		printf("%c",i);
}
</pre>
<p><a href="javascript:;" onmousedown="if(document.getElementById('mydiv').style.display == 'none'){ document.getElementById('mydiv').style.display = 'block'; }else{ document.getElementById('mydiv').style.display = 'none'; }"><strong>Click here to view the answer</strong></a></p>
<div id="mydiv" style="display:none">
<strong>Answer:</strong><br />
contents of zzz.c followed by an infinite loop  </p>
<p><strong>Explanation:</strong><br />
The condition is checked against EOF, it should be checked against NULL.
</div><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/84-predict-output-errors-code/">84. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c-output/84-predict-output-errors-code/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>83. Predict the output or error(s) of the following c code</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-output/83-predict-output-errors-code/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-output/83-predict-output-errors-code/#respond</comments>
		
		<dc:creator><![CDATA[Peter Vegas]]></dc:creator>
		<pubDate>Sun, 09 Oct 2011 12:01:38 +0000</pubDate>
				<category><![CDATA[C - Predict the Output]]></category>
		<category><![CDATA[it interview questions]]></category>
		<category><![CDATA[top interview questions]]></category>
		<category><![CDATA[frequently asked interview questions]]></category>
		<category><![CDATA[engineering questions]]></category>
		<category><![CDATA[c interview question]]></category>
		<category><![CDATA[questions for an interview]]></category>
		<category><![CDATA[interview questions and answers]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1963</guid>

					<description><![CDATA[<pre lang="c" escaped="true" line="1">
#include "stdio.h"
aaa() {
	printf("hi");
}

bbb(){
	printf("hello");
}

ccc(){
	printf("bye");
}

main()
{
	int (*ptr[3])();
	ptr[0]=aaa;
	ptr[1]=bbb;
	ptr[2]=ccc;
	ptr[2]();
}

</pre>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/83-predict-output-errors-code/">83. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1">
#include "stdio.h"
aaa() {
	printf("hi");
}

bbb(){
	printf("hello");
}

ccc(){
	printf("bye");
}

main()
{
	int (*ptr[3])();
	ptr[0]=aaa;
	ptr[1]=bbb;
	ptr[2]=ccc;
	ptr[2]();
}

</pre>
<p><a href="javascript:;" onmousedown="if(document.getElementById('mydiv').style.display == 'none'){ document.getElementById('mydiv').style.display = 'block'; }else{ document.getElementById('mydiv').style.display = 'none'; }"><strong>Click here to view the answer</strong></a></p>
<div id="mydiv" style="display:none">
<strong>Answer:</strong><br />
bye </p>
<p><strong>Explanation:</strong><br />
ptr is array of pointers to functions of return type int.ptr[0] is assigned to address of the function aaa. Similarly ptr[1] and ptr[2] for bbb and ccc respectively. ptr[2]() is in effect of writing ccc(), since ptr[2] points to ccc.
</div><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/83-predict-output-errors-code/">83. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c-output/83-predict-output-errors-code/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>82. Predict the output or error(s) of the following c code</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-output/82-predict-output-errors-code/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-output/82-predict-output-errors-code/#respond</comments>
		
		<dc:creator><![CDATA[Peter Vegas]]></dc:creator>
		<pubDate>Sun, 09 Oct 2011 12:00:56 +0000</pubDate>
				<category><![CDATA[C - Predict the Output]]></category>
		<category><![CDATA[interview questions and answers]]></category>
		<category><![CDATA[questions for an interview]]></category>
		<category><![CDATA[it interview questions]]></category>
		<category><![CDATA[top interview questions]]></category>
		<category><![CDATA[frequently asked interview questions]]></category>
		<category><![CDATA[engineering questions]]></category>
		<category><![CDATA[c interview question]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1964</guid>

					<description><![CDATA[<pre lang="c" escaped="true" line="1"> 	
#include "stdio.h"
int one_d[]={1,2,3};
main()
{
	int *ptr; 
	ptr=one_d;
	ptr+=3;
	printf("%d",*ptr);
}
</pre>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/82-predict-output-errors-code/">82. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1"> 	
#include "stdio.h"
int one_d[]={1,2,3};
main()
{
	int *ptr; 
	ptr=one_d;
	ptr+=3;
	printf("%d",*ptr);
}
</pre>
<p><a href="javascript:;" onmousedown="if(document.getElementById('mydiv').style.display == 'none'){ document.getElementById('mydiv').style.display = 'block'; }else{ document.getElementById('mydiv').style.display = 'none'; }"><strong>Click here to view the answer</strong></a></p>
<div id="mydiv" style="display:none">
<strong>Answer:</strong><br />
garbage value</p>
<p><strong>Explanation:</strong><br />
ptr pointer is pointing to out of the array range of one_d.
</div><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/82-predict-output-errors-code/">82. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c-output/82-predict-output-errors-code/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>81. Predict the output or error(s) of the following c code</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-output/81-predict-output-errors-code/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-output/81-predict-output-errors-code/#respond</comments>
		
		<dc:creator><![CDATA[Peter Vegas]]></dc:creator>
		<pubDate>Sun, 09 Oct 2011 11:59:16 +0000</pubDate>
				<category><![CDATA[C - Predict the Output]]></category>
		<category><![CDATA[interview questions and answers]]></category>
		<category><![CDATA[questions for an interview]]></category>
		<category><![CDATA[top interview questions]]></category>
		<category><![CDATA[it interview questions]]></category>
		<category><![CDATA[frequently asked interview questions]]></category>
		<category><![CDATA[engineering questions]]></category>
		<category><![CDATA[c interview question]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1965</guid>

					<description><![CDATA[<pre lang="c" escaped="true" line="1">
main(int argc, char **argv)
{
	printf("enter the character");
	getchar();
	sum(argv[1],argv[2]);
}
sum(num1,num2)
int num1,num2;
{
	return num1+num2;
}
</pre>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/81-predict-output-errors-code/">81. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1">
main(int argc, char **argv)
{
	printf("enter the character");
	getchar();
	sum(argv[1],argv[2]);
}
sum(num1,num2)
int num1,num2;
{
	return num1+num2;
}
</pre>
<p><a href="javascript:;" onmousedown="if(document.getElementById('mydiv').style.display == 'none'){ document.getElementById('mydiv').style.display = 'block'; }else{ document.getElementById('mydiv').style.display = 'none'; }"><strong>Click here to view the answer</strong></a></p>
<div id="mydiv" style="display:none">
<strong>Answer:</strong><br />
Compiler error.</p>
<p><strong>Explanation:</strong><br />
argv[1] &#038; argv[2] are strings. They are passed to the function sum without converting it to integer values.
</div><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/81-predict-output-errors-code/">81. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c-output/81-predict-output-errors-code/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>80. Predict the output or error(s) of the following c code</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-output/80-predict-output-errors-code/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-output/80-predict-output-errors-code/#respond</comments>
		
		<dc:creator><![CDATA[Peter Vegas]]></dc:creator>
		<pubDate>Thu, 15 Sep 2011 16:55:37 +0000</pubDate>
				<category><![CDATA[C - Predict the Output]]></category>
		<category><![CDATA[interview questions and answers]]></category>
		<category><![CDATA[questions for an interview]]></category>
		<category><![CDATA[it interview questions]]></category>
		<category><![CDATA[top interview questions]]></category>
		<category><![CDATA[frequently asked interview questions]]></category>
		<category><![CDATA[engineering questions]]></category>
		<category><![CDATA[c interview question]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1966</guid>

					<description><![CDATA[<pre lang="c" escaped="true" line="1"> main()
{
	char c=' ',x,convert(z);
	getc(c);
	if((c>='a') &#038;& (c<='z'))
	x=convert(c);
	printf("%c",x);
}

convert(z)
{
	return z-32;
}
</pre>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/80-predict-output-errors-code/">80. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1"> main()
{
	char c=' ',x,convert(z);
	getc(c);
	if((c>='a') && (c<='z'))
	x=convert(c);
	printf("%c",x);
}

convert(z)
{
	return z-32;
}
</pre>
<p><a href="javascript:;" onmousedown="if(document.getElementById('mydiv').style.display == 'none'){ document.getElementById('mydiv').style.display = 'block'; }else{ document.getElementById('mydiv').style.display = 'none'; }"><strong>Click here to view the answer</strong></a></p>
<div id="mydiv" style="display:none">
<strong>Answer:</strong><br />
Compiler error</p>
<p><strong>Explanation:</strong><br />
declaration of convert and format of getc() are wrong.
</div><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/80-predict-output-errors-code/">80. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c-output/80-predict-output-errors-code/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>79. Predict the output or error(s) of the following c code</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-output/79-predict-output-errors-code/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-output/79-predict-output-errors-code/#respond</comments>
		
		<dc:creator><![CDATA[Peter Vegas]]></dc:creator>
		<pubDate>Thu, 15 Sep 2011 16:54:48 +0000</pubDate>
				<category><![CDATA[C - Predict the Output]]></category>
		<category><![CDATA[interview questions and answers]]></category>
		<category><![CDATA[questions for an interview]]></category>
		<category><![CDATA[it interview questions]]></category>
		<category><![CDATA[top interview questions]]></category>
		<category><![CDATA[frequently asked interview questions]]></category>
		<category><![CDATA[engineering questions]]></category>
		<category><![CDATA[c interview question]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1967</guid>

					<description><![CDATA[<pre lang="c" escaped="true" line="1"> main()
{
	char *p;
	int *q;
	long *r;
	p=q=r=0;
	p++;
	q++;
	r++;
	printf("%p...%p...%p",p,q,r);
}
</pre>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/79-predict-output-errors-code/">79. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1"> main()
{
	char *p;
	int *q;
	long *r;
	p=q=r=0;
	p++;
	q++;
	r++;
	printf("%p...%p...%p",p,q,r);
}
</pre>
<p><a href="javascript:;" onmousedown="if(document.getElementById('mydiv').style.display == 'none'){ document.getElementById('mydiv').style.display = 'block'; }else{ document.getElementById('mydiv').style.display = 'none'; }"><strong>Click here to view the answer</strong></a></p>
<div id="mydiv" style="display:none">
<strong>Answer:</strong><br />
0001&#8230;0002&#8230;0004</p>
<p><strong>Explanation:</strong><br />
++ operator  when applied to pointers increments address according to their corresponding data-types.
</div><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/79-predict-output-errors-code/">79. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c-output/79-predict-output-errors-code/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>78. Predict the output or error(s) of the following c code</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-output/78-predict-output-errors-code/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-output/78-predict-output-errors-code/#comments</comments>
		
		<dc:creator><![CDATA[Peter Vegas]]></dc:creator>
		<pubDate>Thu, 15 Sep 2011 16:53:38 +0000</pubDate>
				<category><![CDATA[C - Predict the Output]]></category>
		<category><![CDATA[engineering questions]]></category>
		<category><![CDATA[c interview question]]></category>
		<category><![CDATA[frequently asked interview questions]]></category>
		<category><![CDATA[interview questions and answers]]></category>
		<category><![CDATA[questions for an interview]]></category>
		<category><![CDATA[it interview questions]]></category>
		<category><![CDATA[top interview questions]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1968</guid>

					<description><![CDATA[<pre lang="c" escaped="true" line="1"> main()
{
	int i=_l_abc(10);
 	printf("%d\n",--i);
}

int _l_abc(int i)
{
	return(i++);
}
</pre>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/78-predict-output-errors-code/">78. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1"> main()
{
	int i=_l_abc(10);
 	printf("%d\n",--i);
}

int _l_abc(int i)
{
	return(i++);
}
</pre>
<p><a href="javascript:;" onmousedown="if(document.getElementById('mydiv').style.display == 'none'){ document.getElementById('mydiv').style.display = 'block'; }else{ document.getElementById('mydiv').style.display = 'none'; }"><strong>Click here to view the answer</strong></a></p>
<div id="mydiv" style="display:none">
<strong>Answer:</strong><br />
9</p>
<p><strong>Explanation:</strong><br />
return(i++) it will first return i and then increments. i.e. 10 will be returned.
</div><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/78-predict-output-errors-code/">78. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c-output/78-predict-output-errors-code/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>77. Predict the output or error(s) of the following c code</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-output/77-predict-output-errors-code/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-output/77-predict-output-errors-code/#respond</comments>
		
		<dc:creator><![CDATA[Peter Vegas]]></dc:creator>
		<pubDate>Thu, 15 Sep 2011 16:53:09 +0000</pubDate>
				<category><![CDATA[C - Predict the Output]]></category>
		<category><![CDATA[it interview questions]]></category>
		<category><![CDATA[interview questions and answers]]></category>
		<category><![CDATA[questions for an interview]]></category>
		<category><![CDATA[top interview questions]]></category>
		<category><![CDATA[frequently asked interview questions]]></category>
		<category><![CDATA[engineering questions]]></category>
		<category><![CDATA[c interview question]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1969</guid>

					<description><![CDATA[<pre lang="c" escaped="true" line="1"> 
struct point
{
	int x;
	int y;
};
struct point origin,*pp;
main()
{
	pp=&origin;
	printf("origin is(%d%d)\n",(*pp).x,(*pp).y);
	printf("origin is (%d%d)\n",pp->x,pp->y);
} 
	
</pre>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/77-predict-output-errors-code/">77. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1"> 
struct point
{
	int x;
	int y;
};
struct point origin,*pp;
main()
{
	pp=&origin;
	printf("origin is(%d%d)\n",(*pp).x,(*pp).y);
	printf("origin is (%d%d)\n",pp->x,pp->y);
} 
	
</pre>
<p><a href="javascript:;" onmousedown="if(document.getElementById('mydiv').style.display == 'none'){ document.getElementById('mydiv').style.display = 'block'; }else{ document.getElementById('mydiv').style.display = 'none'; }"><strong>Click here to view the answer</strong></a></p>
<div id="mydiv" style="display:none">
<strong>Answer:</strong><br />
origin is(0,0)<br />
origin is(0,0) </p>
<p><strong>Explanation:</strong><br />
pp is a pointer to structure. we can access the elements of the structure either with arrow mark or with indirection operator. </p>
<p>Note:<br />
Since structure point  is globally declared x &#038; y are initialized as zeroes
</p></div><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/77-predict-output-errors-code/">77. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c-output/77-predict-output-errors-code/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>76. Predict the output or error(s) of the following c code</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-output/76-predict-output-errors-code/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-output/76-predict-output-errors-code/#respond</comments>
		
		<dc:creator><![CDATA[Peter Vegas]]></dc:creator>
		<pubDate>Thu, 15 Sep 2011 16:52:34 +0000</pubDate>
				<category><![CDATA[C - Predict the Output]]></category>
		<category><![CDATA[interview questions and answers]]></category>
		<category><![CDATA[questions for an interview]]></category>
		<category><![CDATA[it interview questions]]></category>
		<category><![CDATA[top interview questions]]></category>
		<category><![CDATA[frequently asked interview questions]]></category>
		<category><![CDATA[engineering questions]]></category>
		<category><![CDATA[c interview question]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1970</guid>

					<description><![CDATA[<pre lang="c" escaped="true" line="1">
struct aaa{
	struct aaa *prev;
	int i;
	struct aaa *next;
};
main()
{
	struct aaa abc,def,ghi,jkl;
	int x=100;
	abc.i=0;abc.prev=&jkl;
	abc.next=&def;
	def.i=1;def.prev=&abc;def.next=&ghi;
	ghi.i=2;ghi.prev=&def;
	ghi.next=&jkl;
	jkl.i=3;jkl.prev=&ghi;jkl.next=&abc;
	x=abc.next->next->prev->next->i;
	printf("%d",x);
}
</pre>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/76-predict-output-errors-code/">76. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1">
struct aaa{
	struct aaa *prev;
	int i;
	struct aaa *next;
};
main()
{
	struct aaa abc,def,ghi,jkl;
	int x=100;
	abc.i=0;abc.prev=&jkl;
	abc.next=&def;
	def.i=1;def.prev=&abc;def.next=&ghi;
	ghi.i=2;ghi.prev=&def;
	ghi.next=&jkl;
	jkl.i=3;jkl.prev=&ghi;jkl.next=&abc;
	x=abc.next->next->prev->next->i;
	printf("%d",x);
}
</pre>
<p><a href="javascript:;" onmousedown="if(document.getElementById('mydiv').style.display == 'none'){ document.getElementById('mydiv').style.display = 'block'; }else{ document.getElementById('mydiv').style.display = 'none'; }"><strong>Click here to view the answer</strong></a></p>
<div id="mydiv" style="display:none">
<strong>Answer:</strong><br />
2</p>
<p><strong>Explanation:</strong><br />
above all statements form a double circular linked list;<br />
abc.next->next->prev->next->i<br />
this one points to &#8220;ghi&#8221; node the value of at particular node is 2.
</div><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-output/76-predict-output-errors-code/">76. Predict the output or error(s) of the following c code</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c-output/76-predict-output-errors-code/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
