<?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>EmbLogic &#187; arjunchamyal</title>
	<atom:link href="https://www.emblogic.com/blog/author/arjunchamyal/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>fibonacci series using pointer</title>
		<link>https://www.emblogic.com/blog/06/fibonacci-series-using-pointer/</link>
		<comments>https://www.emblogic.com/blog/06/fibonacci-series-using-pointer/#comments</comments>
		<pubDate>Sat, 07 Jun 2014 10:24:10 +0000</pubDate>
		<dc:creator><![CDATA[arjunchamyal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=10395</guid>
		<description><![CDATA[1 #include 2 #include 3 int main() 4 { 5 int a,b,c,i,n; 6 b=0; 7 c=1; 8 printf(&#8220;enter the value \n&#8221;); 9 scanf(&#8220;%d&#8221;,&#38;a); 10 int *d; 11 d=(int*)malloc(sizeof(a)); 12 *(d+0)=0; 13 *(d+1)=1; 14 i=2; 15 while(i&#60;a) 16 { 17 *(d+i)=b+c;b=c;c=*(d+i); &#8230; <a href="https://www.emblogic.com/blog/06/fibonacci-series-using-pointer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p> 1 #include<br />
  2 #include<br />
  3 int main()<br />
  4 {<br />
  5     int a,b,c,i,n;<br />
  6     b=0;<br />
  7     c=1;<br />
  8     printf(&#8220;enter the value \n&#8221;);<br />
  9     scanf(&#8220;%d&#8221;,&amp;a);<br />
 10     int *d;<br />
 11     d=(int*)malloc(sizeof(a));<br />
 12     *(d+0)=0;<br />
 13     *(d+1)=1;<br />
 14     i=2;<br />
 15     while(i&lt;a)<br />
 16     {<br />
 17     *(d+i)=b+c;b=c;c=*(d+i);<br />
 18     i++;<br />
 19     }<br />
 20     for(i=0;i&lt;a;i++)<br />
 21     printf(&quot;%d\n&quot;,*(d+i));<br />
 22 }   </p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/06/fibonacci-series-using-pointer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fibonacci series using array</title>
		<link>https://www.emblogic.com/blog/06/fibonacci-series-using-array/</link>
		<comments>https://www.emblogic.com/blog/06/fibonacci-series-using-array/#comments</comments>
		<pubDate>Sat, 07 Jun 2014 10:20:56 +0000</pubDate>
		<dc:creator><![CDATA[arjunchamyal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=10247</guid>
		<description><![CDATA[1 #include 2 int main() 3 { 4 int a,b,c,i,n; 5 b=0; 6 c=1; 7 printf(&#8220;enter the value \n&#8221;); 8 scanf(&#8220;%d&#8221;,&#38;a); 9 int d[a]; 10 d[0]=0; 11 d[1]=1; 12 i=2; 13 printf(&#8220;%d&#8221;,d[0]); 14 while(i&#60;a) 15 { 16 d[i]=b+c;b=c;c=d[i]; 17 i++; &#8230; <a href="https://www.emblogic.com/blog/06/fibonacci-series-using-array/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p> 1 #include<br />
  2 int main()<br />
  3 {<br />
  4     int a,b,c,i,n;<br />
  5     b=0;<br />
  6     c=1;<br />
  7     printf(&#8220;enter the value \n&#8221;);<br />
  8     scanf(&#8220;%d&#8221;,&amp;a);<br />
  9     int d[a];<br />
 10     d[0]=0;<br />
 11     d[1]=1;<br />
 12     i=2;<br />
 13     printf(&#8220;%d&#8221;,d[0]);<br />
 14     while(i&lt;a)<br />
 15     {<br />
 16     d[i]=b+c;b=c;c=d[i];<br />
 17     i++;<br />
 18     }for(i=0;i&lt;a;i++)<br />
 20     printf(&quot;%d\n&quot;,d[i]);<br />
 21 }</p>
<p> 19     for(i=0;i&lt;a;i++)<br />
 20     printf(&quot;%d\n&quot;,d[i]);<br />
 21 }<br />
 22 </p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/06/fibonacci-series-using-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPC using MSG QUEUE</title>
		<link>https://www.emblogic.com/blog/04/ipc-using-msg-queue/</link>
		<comments>https://www.emblogic.com/blog/04/ipc-using-msg-queue/#comments</comments>
		<pubDate>Tue, 01 Apr 2014 15:13:38 +0000</pubDate>
		<dc:creator><![CDATA[arjunchamyal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9666</guid>
		<description><![CDATA[head 1.1; access; symbols; locks arjun:1.1; strict; comment @ * @; 1.1 date 2014.04.01.15.08.45; author arjun; state Exp; branches; next ; desc @we are using msg queue in ipc project @ 1.1 log @Initial revision @]]></description>
				<content:encoded><![CDATA[<p>head	1.1;<br />
access;<br />
symbols;<br />
locks<br />
	arjun:1.1; strict;<br />
comment	@ * @;</p>
<p>1.1<br />
date	2014.04.01.15.08.45;	author arjun;	state Exp;<br />
branches;<br />
next	;</p>
<p>desc<br />
@we are using msg queue in ipc project<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision<br />
@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/04/ipc-using-msg-queue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RCS</title>
		<link>https://www.emblogic.com/blog/03/rcs-3/</link>
		<comments>https://www.emblogic.com/blog/03/rcs-3/#comments</comments>
		<pubDate>Sun, 30 Mar 2014 18:25:12 +0000</pubDate>
		<dc:creator><![CDATA[arjunchamyal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9682</guid>
		<description><![CDATA[IT is revision control system. With the help of this we can create an image file and we can change our data, and if we want back our previous data, we can do it with the help of rcs. To &#8230; <a href="https://www.emblogic.com/blog/03/rcs-3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>IT is revision control system.<br />
With the help of this we can create an image file and we can change our data, and if we want back our previous data, we can do it with the help of rcs.<br />
To do this, first you have to do rcs -i &#8220;name of file&#8221;,<br />
after this you have to check in<br />
ci &#8220;name of file&#8221;.<br />
then check out with lock<br />
co -l &#8220;name of file&#8221;. </p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/rcs-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPC using FIFO</title>
		<link>https://www.emblogic.com/blog/03/ipc-using-fifo-2/</link>
		<comments>https://www.emblogic.com/blog/03/ipc-using-fifo-2/#comments</comments>
		<pubDate>Sat, 29 Mar 2014 16:41:34 +0000</pubDate>
		<dc:creator><![CDATA[arjunchamyal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9626</guid>
		<description><![CDATA[head 1.1; access; symbols; locks arjun:1.1; strict; comment @ * @; 1.1 date 2014.03.29.16.36.13; author arjun; state Exp; branches; next ; desc @ipc using fifo here we are using one fifo for requesting client to server we are able to &#8230; <a href="https://www.emblogic.com/blog/03/ipc-using-fifo-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>head	1.1;<br />
access;<br />
symbols;<br />
locks<br />
	arjun:1.1; strict;<br />
comment	@ * @;</p>
<p>1.1<br />
date	2014.03.29.16.36.13;	author arjun;	state Exp;<br />
branches;<br />
next	;</p>
<p>desc<br />
@ipc using fifo<br />
here we are using one fifo for requesting client to server<br />
we are able to collect the right data at server<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision<br />
@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/ipc-using-fifo-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPC</title>
		<link>https://www.emblogic.com/blog/03/ipc-12/</link>
		<comments>https://www.emblogic.com/blog/03/ipc-12/#comments</comments>
		<pubDate>Fri, 28 Mar 2014 17:11:40 +0000</pubDate>
		<dc:creator><![CDATA[arjunchamyal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9510</guid>
		<description><![CDATA[head 1.5; access; symbols; locks arjun:1.5; strict; comment @ * @; 1.5 date 2014.03.28.17.04.43; author arjun; state Exp; branches; next 1.4; 1.4 date 2014.03.27.15.56.06; author arjun; state Exp; branches; next 1.3; 1.3 date 2014.03.27.06.05.30; author arjun; state Exp; branches; next &#8230; <a href="https://www.emblogic.com/blog/03/ipc-12/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>head	1.5;<br />
access;<br />
symbols;<br />
locks<br />
	arjun:1.5; strict;<br />
comment	@ * @;</p>
<p>1.5<br />
date	2014.03.28.17.04.43;	author arjun;	state Exp;<br />
branches;<br />
next	1.4;</p>
<p>1.4<br />
date	2014.03.27.15.56.06;	author arjun;	state Exp;<br />
branches;<br />
next	1.3;</p>
<p>1.3<br />
date	2014.03.27.06.05.30;	author arjun;	state Exp;<br />
branches;<br />
next	1.2;</p>
<p>1.2<br />
date	2014.03.25.08.06.10;	author arjun;	state Exp;<br />
branches;<br />
next	1.1;</p>
<p>1.1<br />
date	2014.03.25.05.16.16;	author arjun;	state Exp;<br />
branches;<br />
next	;</p>
<p>desc<br />
@we are using 2 pipe for requesting client and same for processing client<br />
but not use switch case in server.<br />
@</p>
<p>1.5<br />
log<br />
@now we are able to collect the data at server from processing client<br />
@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/ipc-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPC using PIPE</title>
		<link>https://www.emblogic.com/blog/03/ipc-using-pipe-2/</link>
		<comments>https://www.emblogic.com/blog/03/ipc-using-pipe-2/#comments</comments>
		<pubDate>Thu, 27 Mar 2014 15:49:04 +0000</pubDate>
		<dc:creator><![CDATA[arjunchamyal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9574</guid>
		<description><![CDATA[head 1.3; access; symbols; locks arjun:1.3; strict; comment @ * @; 1.3 date 2014.03.27.06.05.30; author arjun; state Exp; branches; next 1.2; 1.2 date 2014.03.25.08.06.10; author arjun; state Exp; branches; next 1.1; 1.1 date 2014.03.25.05.16.16; author arjun; state Exp; branches; next &#8230; <a href="https://www.emblogic.com/blog/03/ipc-using-pipe-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>head	1.3;<br />
access;<br />
symbols;<br />
locks<br />
	arjun:1.3; strict;<br />
comment	@ * @;</p>
<p>1.3<br />
date	2014.03.27.06.05.30;	author arjun;	state Exp;<br />
branches;<br />
next	1.2;</p>
<p>1.2<br />
date	2014.03.25.08.06.10;	author arjun;	state Exp;<br />
branches;<br />
next	1.1;</p>
<p>1.1<br />
date	2014.03.25.05.16.16;	author arjun;	state Exp;<br />
branches;<br />
next	;</p>
<p>desc<br />
@we are using 2 pipe for requesting client and same for processing client<br />
but not use switch case in server.<br />
@</p>
<p>1.3<br />
log<br />
@we are facing problem to read the data from client<br />
@<br />
text</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/ipc-using-pipe-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPC</title>
		<link>https://www.emblogic.com/blog/03/ipc-11/</link>
		<comments>https://www.emblogic.com/blog/03/ipc-11/#comments</comments>
		<pubDate>Wed, 26 Mar 2014 15:35:08 +0000</pubDate>
		<dc:creator><![CDATA[arjunchamyal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9451</guid>
		<description><![CDATA[head 1.1; access; symbols; locks arjun:1.1; strict; comment @ * @; 1.1 date 2014.03.21.15.02.57; author arjun; state Exp; branches; next ; desc @we are making a server which has 3 requesting client and 3 processing client but right now it &#8230; <a href="https://www.emblogic.com/blog/03/ipc-11/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>head	1.1;<br />
access;<br />
symbols;<br />
locks<br />
	arjun:1.1; strict;<br />
comment	@ * @;</p>
<p>1.1<br />
date	2014.03.21.15.02.57;	author arjun;	state Exp;<br />
branches;<br />
next	;</p>
<p>desc<br />
@we are making a server which has 3 requesting client and 3 processing client<br />
but right now it has 3 requesting client and 1processing client<br />
we are using different pipe here for all type of client<br />
all requesting client are working properly<br />
bt processing client is not working properly<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision<br />
@<br />
text<br />
@#include<br />
#include<br />
int main()<br />
{<br />
        int pid,pfd[2],buf5[4],ret,z;<br />
	char a[4],b[4];<br />
        ret=pipe(pfd);<br />
        sprintf(a,&#8221;%d&#8221;,pfd[0]);<br />
        sprintf(b,&#8221;%d&#8221;,pfd[1]);<br />
                pid=fork();<br />
                if(pid&gt;0)<br />
                {<br />
                        printf(&#8220;i am parent\n&#8221;);<br />
                        int i,retw,retr,pid1,add_ret,add_retr,add_pfd[2],buf1[3],buf2[3],buf[3],buf3[3];<br />
			char c[4],d[4],e[4],f[4],g[4],h[4],k[4],l[4],m[4],n[4];<br />
			retr=read(pfd[0],buf2,12);<br />
			for(i=0;i&lt;3;i++)<br />
				printf(&quot;buf2[%d]=%d\n&quot;,i,buf2[i]);</p>
<p>			add_ret=pipe(add_pfd);<br />
			sprintf(c,&quot;%d&quot;,add_pfd[0]);<br />
        		sprintf(d,&quot;%d&quot;,add_pfd[1]);<br />
                        pid1=fork();<br />
                        if(pid1==0)<br />
                                {<br />
                                        printf(&quot;i am  child2\n&quot;);<br />
                                        execl(&quot;cl2&quot;,&quot;arjun&quot;,c,d,NULL);<br />
                                }</p>
<p>					add_retr=read(add_pfd[0],buf3,12);<br />
					for(i=0;i&lt;3;i++)<br />
						printf(&quot;buf3[%d]=%d\n&quot;,i,buf3[i]);</p>
<p>			                int pid2,mul_pfd[2],mul_retr,mul_ret,buf4[3];<br />
					mul_ret=pipe(mul_pfd);<br />
					sprintf(e,&quot;%d&quot;,mul_pfd[0]);<br />
        				sprintf(f,&quot;%d&quot;,mul_pfd[1]);</p>
<p>                                        pid2=fork();<br />
                                        if(pid2==0)<br />
                                                {<br />
                                                        printf(&quot;i am child3\n&quot;);<br />
                                                        execl(&quot;cl3&quot;,&quot;arjun&quot;,e,f,NULL);<br />
                                                }</p>
<p>							mul_retr=read(mul_pfd[0],buf4,12);<br />
							for(i=0;i&lt;3;i++)<br />
								printf(&quot;buf4[%d]=%d\n&quot;,i,buf4[i]);</p>
<p>					int pid3,padd_pfd[2],padd_retr,padd_ret,padd_retw,resadd;<br />
					padd_ret=pipe(padd_pfd);<br />
					sprintf(g,&quot;%d&quot;,padd_pfd[0]);<br />
        				sprintf(h,&quot;%d&quot;,padd_pfd[1]);<br />
					pid3=fork();<br />
					if(pid3==0)<br />
						{<br />
							padd_retw=write(padd_pfd[1],buf2,12);<br />
							printf(&quot;i am pchild1\n&quot;);<br />
							execl(&quot;pcl1&quot;,&quot;arjun&quot;,g,h,NULL);<br />
						}<br />
				/*<br />
							printf(&quot;padd_retw=%d\n&quot;,padd_retw);<br />
							padd_retr=read(padd_pfd[0],&amp;resadd,1);<br />
							printf(&quot;result is =%d&quot;,resadd);<br />
				*/<br />
                }<br />
        else<br />
                        {<br />
                                printf(&quot;i am child1\n&quot;);<br />
                        execl(&quot;./cl1&quot;,&quot;arjun&quot;,a,b,NULL);<br />
                        }</p>
<p>}</p>
<p>@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/ipc-11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PIPE</title>
		<link>https://www.emblogic.com/blog/03/pipe-3/</link>
		<comments>https://www.emblogic.com/blog/03/pipe-3/#comments</comments>
		<pubDate>Tue, 25 Mar 2014 15:09:30 +0000</pubDate>
		<dc:creator><![CDATA[arjunchamyal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9372</guid>
		<description><![CDATA[we can use pipe between two related process only, related means both process has same pid in their past. after that we can read and write the data from any end. To make a related process between two unrelated process, &#8230; <a href="https://www.emblogic.com/blog/03/pipe-3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>we can use pipe between two related process only, related means both process has same pid in their past. after that we can read and write the data from any end.<br />
To make a related process between two unrelated process, we have to do fork.<br />
Now question is why we are using fork to make related process.<br />
We are using fork to create a child process for our current process.<br />
In this case child has its own pid but its ppid is same as current process pid.<br />
It means both has a relation, but now problem is how we relate two different process.<br />
we can create a relation between two different  process with the help of execl().<br />
We are using execl() in child only. besause if we are using execl() in parent thn it is not execute the whole process, it is terminated after the execl(). So it is compulsary to use execl() in child .<br />
pipe has two descriptor one and zero.<br />
zero for read abd One for write.<br />
if pipe return zero it means it is created else it is not created.we have to pass the file descriptor to the other process through execl () in child.<br />
Execl() takes string only and it is terminated by null.<br />
and to make a string to pipe file descriptor, we are using sprintf function.<br />
To take all the arrguments from child to other process we have to make the command line function to that funcion.<br />
Now we can use pipe between two different process.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/pipe-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ipc using pipe</title>
		<link>https://www.emblogic.com/blog/03/ipc-using-pipe/</link>
		<comments>https://www.emblogic.com/blog/03/ipc-using-pipe/#comments</comments>
		<pubDate>Tue, 25 Mar 2014 09:08:18 +0000</pubDate>
		<dc:creator><![CDATA[arjunchamyal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9370</guid>
		<description><![CDATA[head 1.2; access; symbols; locks arjun:1.2; strict; comment @ * @; 1.2 date 2014.03.25.08.06.10; author arjun; state Exp; branches; next 1.1; 1.1 date 2014.03.25.05.16.16; author arjun; state Exp; branches; next ; desc @we are using 2 pipe for requesting client &#8230; <a href="https://www.emblogic.com/blog/03/ipc-using-pipe/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>head	1.2;<br />
access;<br />
symbols;<br />
locks<br />
	arjun:1.2; strict;<br />
comment	@ * @;</p>
<p>1.2<br />
date	2014.03.25.08.06.10;	author arjun;	state Exp;<br />
branches;<br />
next	1.1;</p>
<p>1.1<br />
date	2014.03.25.05.16.16;	author arjun;	state Exp;<br />
branches;<br />
next	;</p>
<p>desc<br />
@we are using 2 pipe for requesting client and same for processing client<br />
but not use switch case in server.<br />
@</p>
<p>1.2<br />
log<br />
@we are using switch case in server to find out the operator.<br />
@<br />
text<br />
@#include<br />
#include<br />
int main()<br />
{<br />
	int i,pfd1[2],pfd2[2],pfd3[2],pfd4[2],pid1,pid2,pid3,pid4,pid5,pid6,ret1r,ret1w,ret2r,ret2w,ret3r,ret3w,ret4r,ret4w,ret5r,ret5w,ret6r,ret6w,ret1,ret2,ret3,ret4,buf1[4],buf2[4],buf3[4],buf4[4],addres,subres,mulres,ch;<br />
	char a[4],b[4],c[4],d[4],e[4],f[4],g[4],h[4];<br />
	ret1=pipe(pfd1);<br />
	ret2=pipe(pfd2);<br />
	ret3=pipe(pfd3);<br />
	ret4=pipe(pfd4);<br />
	sprintf(a,&#8221;%d&#8221;,pfd1[0]);<br />
	sprintf(b,&#8221;%d&#8221;,pfd1[1]);<br />
	sprintf(c,&#8221;%d&#8221;,pfd2[0]);<br />
	sprintf(d,&#8221;%d&#8221;,pfd2[1]);<br />
	sprintf(e,&#8221;%d&#8221;,pfd3[0]);<br />
	sprintf(f,&#8221;%d&#8221;,pfd3[1]);<br />
	sprintf(g,&#8221;%d&#8221;,pfd4[0]);<br />
	sprintf(h,&#8221;%d&#8221;,pfd4[1]);<br />
	pid1=fork();<br />
	if(pid1&gt;0)<br />
		{<br />
			printf(&#8220;i am parent\n&#8221;);<br />
			ret1r=read(pfd1[0],buf1,12);</p>
<p>			pid2=fork();<br />
			if(pid2==0)<br />
				{<br />
					printf(&#8220;i am child2\n&#8221;);<br />
					execl(&#8220;./cl2&#8243;,&#8221;arjun&#8221;,b,c,NULL);<br />
				}<br />
			else<br />
				{<br />
					ret2r=read(pfd1[0],buf2,12);<br />
				}<br />
			pid3=fork();<br />
			if(pid3==0)<br />
				{<br />
					printf(&#8220;i am child3\n&#8221;);<br />
					execl(&#8220;./cl3&#8243;,&#8221;arjun&#8221;,b,c,NULL);<br />
				}<br />
			else<br />
				{</p>
<p>					ret3r=read(pfd1[0],buf3,12);<br />
				}<br />
			int *buff4[3]={(int*)buf1,(int*)buf2,(int*)buf3};<br />
				for(i=0;i&lt;3;i++)<br />
					{<br />
						ch= *((int*)buff4[i]);<br />
						switch(ch)<br />
						{<br />
							case 43:<br />
							{<br />
								pid4=fork();<br />
								if(pid4==0)<br />
								{<br />
									ret4w=write(pfd3[1],buf1,12);<br />
									printf(&quot;i am pchild1\n&quot;);<br />
									execl(&quot;./pcl1&quot;,&quot;arjun&quot;,e,h,NULL);<br />
								}<br />
								else<br />
								{<br />
									ret4r=read(pfd4[0],&amp;addres,4);<br />
									ret1w=write(pfd2[1],&amp;addres,4);<br />
								}<br />
							}<br />
								break;<br />
							case 45:<br />
							{<br />
								pid5=fork();<br />
								if(pid5==0)<br />
								{<br />
									ret5w=write(pfd3[1],buf2,12);<br />
									printf(&quot;i am pchild2\n&quot;);<br />
									execl(&quot;./pcl2&quot;,&quot;arjun&quot;,e,h,NULL);<br />
								}<br />
								else<br />
								{<br />
									ret5r=read(pfd4[0],&amp;subres,4);<br />
									ret2w=write(pfd2[1],&amp;subres,4);<br />
								}<br />
							}<br />
								break;<br />
							default :<br />
							{<br />
								pid6=fork();<br />
								if(pid6==0)<br />
								{<br />
									ret6w=write(pfd3[1],buf2,12);<br />
									printf(&quot;i am pchild3\n&quot;);<br />
									execl(&quot;./pcl3&quot;,&quot;arjun&quot;,e,h,NULL);<br />
								}<br />
								else<br />
								{<br />
									ret6r=read(pfd4[0],&amp;subres,4);<br />
									ret3w=write(pfd2[1],&amp;subres,4);<br />
								}<br />
							}<br />
								break;<br />
						}<br />
					}</p>
<p>		}<br />
		else<br />
			{<br />
				printf(&quot;i am child1\n&quot;);<br />
				execl(&quot;./cl1&quot;,&quot;arjun&quot;,b,c,NULL);<br />
			}<br />
}<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision<br />
@<br />
text<br />
@d5 1<br />
a5 1<br />
	int i,pfd1[2],pfd2[2],pfd3[2],pfd4[2],pid1,pid2,pid3,pid4,pid5,pid6,ret1r,ret1w,ret2r,ret2w,ret3r,ret3w,ret4r,ret4w,ret5r,ret5w,ret6r,ret6w,ret1,ret2,ret3,ret4,buf1[4],buf2[4],buf3[4],buf4[4],addres,subres,mulres;<br />
d48 2<br />
a49 3</p>
<p>				pid4=fork();<br />
				if(pid4==0)<br />
d51 52<br />
a102 3<br />
						ret4w=write(pfd3[1],buf1,12);<br />
						printf(&quot;i am pchild1\n&quot;);<br />
						execl(&quot;./pcl1&quot;,&quot;arjun&quot;,e,h,NULL);<br />
a103 32<br />
				else<br />
					{<br />
						ret4r=read(pfd4[0],&amp;addres,4);<br />
						ret1w=write(pfd2[1],&amp;addres,4);<br />
					}</p>
<p>				pid5=fork();<br />
				if(pid5==0)<br />
					{<br />
						ret5w=write(pfd3[1],buf2,12);<br />
						printf(&quot;i am pchild2\n&quot;);<br />
						execl(&quot;./pcl2&quot;,&quot;arjun&quot;,e,h,NULL);<br />
					}<br />
				else<br />
					{<br />
						ret5r=read(pfd4[0],&amp;subres,4);<br />
						ret2w=write(pfd2[1],&amp;subres,4);<br />
					}<br />
				pid6=fork();<br />
				if(pid6==0)<br />
					{<br />
						ret6w=write(pfd3[1],buf2,12);<br />
						printf(&quot;i am pchild3\n&quot;);<br />
						execl(&quot;./pcl3&quot;,&quot;arjun&quot;,e,h,NULL);<br />
					}<br />
				else<br />
					{<br />
						ret6r=read(pfd4[0],&amp;subres,4);<br />
						ret3w=write(pfd2[1],&amp;subres,4);<br />
					}	</p>
<p>@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/ipc-using-pipe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C library function &#8211; atoi()</title>
		<link>https://www.emblogic.com/blog/03/c-library-function-atoi/</link>
		<comments>https://www.emblogic.com/blog/03/c-library-function-atoi/#comments</comments>
		<pubDate>Thu, 13 Mar 2014 14:57:09 +0000</pubDate>
		<dc:creator><![CDATA[arjunchamyal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9060</guid>
		<description><![CDATA[The library function atoi converts string argument to integer just like sscanf. This function returns the converted integer number as an int value. If no valid conversion could be performed, it returns zero.]]></description>
				<content:encoded><![CDATA[<p>The library function atoi converts string argument to integer just like sscanf.<br />
This function returns the converted integer number as an int value. If no valid conversion could be performed, it returns zero.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/c-library-function-atoi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is ELF file format</title>
		<link>https://www.emblogic.com/blog/03/what-is-elf-file-format/</link>
		<comments>https://www.emblogic.com/blog/03/what-is-elf-file-format/#comments</comments>
		<pubDate>Mon, 03 Mar 2014 06:10:55 +0000</pubDate>
		<dc:creator><![CDATA[arjunchamyal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=8747</guid>
		<description><![CDATA[It is Extensible linking format. It was chosen as standard binary file format for Unix like system . It is extensible and flexible by design so it is used in many operating systems and on many different platform. &#160;]]></description>
				<content:encoded><![CDATA[<p>It is Extensible linking format.</p>
<p>It was chosen as standard binary file format for Unix like system .</p>
<p>It is extensible and flexible by design so it is used in many operating systems and on many different platform.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/what-is-elf-file-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
