<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Program for Bit Stuffing</title>
	<atom:link href="http://electrofriends.com/source-codes/software-programs/c/program-for-bit-stuffing/feed/" rel="self" type="application/rss+xml" />
	<link>http://electrofriends.com/source-codes/software-programs/c/program-for-bit-stuffing/</link>
	<description>...bringing innovative minds together</description>
	<lastBuildDate>Mon, 21 May 2012 08:19:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: jay</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/program-for-bit-stuffing/comment-page-1/#comment-7271</link>
		<dc:creator>jay</dc:creator>
		<pubDate>Thu, 12 Apr 2012 16:37:09 +0000</pubDate>
		<guid isPermaLink="false">http://electrofriends.com/?p=757#comment-7271</guid>
		<description>#include
#include
#include
#include
#include
#include &quot;myheader.h&quot;
int main()
{
	char str1[50],str2[50];
	int i=0,j=0,len,count=0;
	int open_status,mknod_status;
	
	printf(&quot;Enter The String : &quot;);
	scanf(&quot;%s&quot;,str1);
	len=strlen(str1);
	
	printf(&quot;Displaying Bit Values :\n&quot;);
	for(i=0;i&lt;len;i++)
	{
		printf(&quot;Bit Values For %c : &quot;,str1[i]);
		displaybit(str1[i]);
		printf(&quot;\n&quot;);
	}
	
	printf(&quot;\nReplacing bit :\n&quot;);
	
	for(i=0;i&lt;len;i++)
	{
		for(j=0;j&lt;=7;j++)
		{
			if((getbit(str1[i],j)==1))
			{
				count++;
			}
			if(count==5)
			{
				insertbit(count+1,str1[j],0);
				count=0;
			}
			//count++;
		}
	}
	
	printf(&quot;Displaying Bit Values After Changing bit :\n&quot;);
	for(i=0;i&lt;len;i++)
	{
		printf(&quot;Bit Values For %c : &quot;,str1[i]);
		displaybit(str1[i]);
		printf(&quot;\n&quot;);
	}
	
	str2[0]=&#039;~&#039;;
	for(i=1;i&lt;len;i++)
	{
		str2[i]=str1[i-1];
	}        
	str2[i]=&#039;~&#039;;
	len=strlen(str2);
	for(i=0;i&lt;len;i++)
	{
		printf(&quot;Character Bit : %c \n&quot;,str2[i]);
	}
	
	printf(&quot;\nNew String:  %s&quot;,str2);
	
	
	mknod_status=mknod(&quot;pipe&quot;,S_IFIFO&#124;S_IRWXU,0);
      
        if(mknod_status&lt;0)									
        {
              printf(&quot;error in pipe &quot;);
        
        }
        open_status=open(&quot;pipe&quot;,O_WRONLY);
        if(open_status&lt;0)									
        {
              printf(&quot;error in open &quot;);
        
       }
        write(open_status,str2,sizeof(str2));
        
	
	close(open_status);	
return 0;
}</description>
		<content:encoded><![CDATA[<p>#include<br />
#include<br />
#include<br />
#include<br />
#include<br />
#include &#8220;myheader.h&#8221;<br />
int main()<br />
{<br />
	char str1[50],str2[50];<br />
	int i=0,j=0,len,count=0;<br />
	int open_status,mknod_status;</p>
<p>	printf(&#8220;Enter The String : &#8220;);<br />
	scanf(&#8220;%s&#8221;,str1);<br />
	len=strlen(str1);</p>
<p>	printf(&#8220;Displaying Bit Values :\n&#8221;);<br />
	for(i=0;i&lt;len;i++)<br />
	{<br />
		printf(&quot;Bit Values For %c : &quot;,str1[i]);<br />
		displaybit(str1[i]);<br />
		printf(&quot;\n&quot;);<br />
	}</p>
<p>	printf(&quot;\nReplacing bit :\n&quot;);</p>
<p>	for(i=0;i&lt;len;i++)<br />
	{<br />
		for(j=0;j&lt;=7;j++)<br />
		{<br />
			if((getbit(str1[i],j)==1))<br />
			{<br />
				count++;<br />
			}<br />
			if(count==5)<br />
			{<br />
				insertbit(count+1,str1[j],0);<br />
				count=0;<br />
			}<br />
			//count++;<br />
		}<br />
	}</p>
<p>	printf(&quot;Displaying Bit Values After Changing bit :\n&quot;);<br />
	for(i=0;i&lt;len;i++)<br />
	{<br />
		printf(&quot;Bit Values For %c : &quot;,str1[i]);<br />
		displaybit(str1[i]);<br />
		printf(&quot;\n&quot;);<br />
	}</p>
<p>	str2[0]=&#039;~&#039;;<br />
	for(i=1;i&lt;len;i++)<br />
	{<br />
		str2[i]=str1[i-1];<br />
	}<br />
	str2[i]=&#039;~&#039;;<br />
	len=strlen(str2);<br />
	for(i=0;i&lt;len;i++)<br />
	{<br />
		printf(&quot;Character Bit : %c \n&quot;,str2[i]);<br />
	}</p>
<p>	printf(&quot;\nNew String:  %s&quot;,str2);</p>
<p>	mknod_status=mknod(&quot;pipe&quot;,S_IFIFO|S_IRWXU,0);</p>
<p>        if(mknod_status&lt;0)<br />
        {<br />
              printf(&quot;error in pipe &quot;);</p>
<p>        }<br />
        open_status=open(&quot;pipe&quot;,O_WRONLY);<br />
        if(open_status&lt;0)<br />
        {<br />
              printf(&quot;error in open &quot;);</p>
<p>       }<br />
        write(open_status,str2,sizeof(str2));</p>
<p>	close(open_status);<br />
return 0;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abcd</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/program-for-bit-stuffing/comment-page-1/#comment-6706</link>
		<dc:creator>abcd</dc:creator>
		<pubDate>Tue, 24 Jan 2012 04:30:27 +0000</pubDate>
		<guid isPermaLink="false">http://electrofriends.com/?p=757#comment-6706</guid>
		<description>Chosen by Asker
#include 
#include 

void main()
{
char num[11], i, j, k, cnt=0;
clrscr();
printf(&quot;Enter the sequence of 10 digit binary numbers: &quot;);
for(i=0;i&lt;10;i++)
scanf(&quot;%c&quot;, &amp;num[i]);
printf(&quot;The 10 digit binary number you have entered is: &quot;);
for(i=0;i&lt;10;i++)
printf(&quot;%c&quot;, num[i]);
printf(&quot;\nAfter stuffing: &quot;);
i=0;
while (ii;k--)
num[k]=num[k-1];
num[i]=0;
num[i]=&#039;0&#039;;
}
}
else
{
i++;
cnt=0;
}
}
for(i=0;i&lt;11;i++)
printf(&quot;%c&quot;, num[i]);
printf(&quot;\nAfter destuffing: &quot;);
i=0;
while (i&lt;10)
{
if(num[i]==&#039;1&#039;)
{
i++;
cnt++;
if(cnt==5)
{
for(k=i;k&lt;11;k++)
num[k]=num[k+1];
}
}
else
{
i++;
cnt=0;
}
}
for(i=0;i&lt;10;i++)
printf(&quot;%d&quot;, num[i]-48);
getch();</description>
		<content:encoded><![CDATA[<p>Chosen by Asker<br />
#include<br />
#include </p>
<p>void main()<br />
{<br />
char num[11], i, j, k, cnt=0;<br />
clrscr();<br />
printf(&#8220;Enter the sequence of 10 digit binary numbers: &#8220;);<br />
for(i=0;i&lt;10;i++)<br />
scanf(&quot;%c&quot;, &amp;num[i]);<br />
printf(&quot;The 10 digit binary number you have entered is: &quot;);<br />
for(i=0;i&lt;10;i++)<br />
printf(&quot;%c&quot;, num[i]);<br />
printf(&quot;\nAfter stuffing: &quot;);<br />
i=0;<br />
while (ii;k&#8211;)<br />
num[k]=num[k-1];<br />
num[i]=0;<br />
num[i]=&#8217;0&#8242;;<br />
}<br />
}<br />
else<br />
{<br />
i++;<br />
cnt=0;<br />
}<br />
}<br />
for(i=0;i&lt;11;i++)<br />
printf(&quot;%c&quot;, num[i]);<br />
printf(&quot;\nAfter destuffing: &quot;);<br />
i=0;<br />
while (i&lt;10)<br />
{<br />
if(num[i]==&#039;1&#039;)<br />
{<br />
i++;<br />
cnt++;<br />
if(cnt==5)<br />
{<br />
for(k=i;k&lt;11;k++)<br />
num[k]=num[k+1];<br />
}<br />
}<br />
else<br />
{<br />
i++;<br />
cnt=0;<br />
}<br />
}<br />
for(i=0;i&lt;10;i++)<br />
printf(&quot;%d&quot;, num[i]-48);<br />
getch();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pawan</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/program-for-bit-stuffing/comment-page-1/#comment-6464</link>
		<dc:creator>pawan</dc:creator>
		<pubDate>Thu, 22 Dec 2011 09:56:08 +0000</pubDate>
		<guid isPermaLink="false">http://electrofriends.com/?p=757#comment-6464</guid>
		<description>the code is not showing the correct result for string length greater then 10</description>
		<content:encoded><![CDATA[<p>the code is not showing the correct result for string length greater then 10</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohan</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/program-for-bit-stuffing/comment-page-1/#comment-4789</link>
		<dc:creator>Mohan</dc:creator>
		<pubDate>Sat, 09 Apr 2011 22:54:22 +0000</pubDate>
		<guid isPermaLink="false">http://electrofriends.com/?p=757#comment-4789</guid>
		<description>Thanku darling</description>
		<content:encoded><![CDATA[<p>Thanku darling</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harsh</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/program-for-bit-stuffing/comment-page-1/#comment-4393</link>
		<dc:creator>Harsh</dc:creator>
		<pubDate>Wed, 23 Feb 2011 14:33:44 +0000</pubDate>
		<guid isPermaLink="false">http://electrofriends.com/?p=757#comment-4393</guid>
		<description>in the bit stuffing program put count=0,then it will run correctly,i.e.it will put 0 after 011111</description>
		<content:encoded><![CDATA[<p>in the bit stuffing program put count=0,then it will run correctly,i.e.it will put 0 after 011111</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: soumya</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/program-for-bit-stuffing/comment-page-1/#comment-4349</link>
		<dc:creator>soumya</dc:creator>
		<pubDate>Mon, 21 Feb 2011 16:19:58 +0000</pubDate>
		<guid isPermaLink="false">http://electrofriends.com/?p=757#comment-4349</guid>
		<description>after for loop plz initilize the count to 1.the it will work for any number of bits having 
5 continuous 1&#039;s............</description>
		<content:encoded><![CDATA[<p>after for loop plz initilize the count to 1.the it will work for any number of bits having<br />
5 continuous 1&#8242;s&#8230;&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: soumya</title>
		<link>http://electrofriends.com/source-codes/software-programs/c/program-for-bit-stuffing/comment-page-1/#comment-4348</link>
		<dc:creator>soumya</dc:creator>
		<pubDate>Mon, 21 Feb 2011 16:19:02 +0000</pubDate>
		<guid isPermaLink="false">http://electrofriends.com/?p=757#comment-4348</guid>
		<description>after for loop plz initilize the count to 1.the it will work for any number of bits having 
5 continuous 1&#039;s</description>
		<content:encoded><![CDATA[<p>after for loop plz initilize the count to 1.the it will work for any number of bits having<br />
5 continuous 1&#8242;s</p>
]]></content:encoded>
	</item>
</channel>
</rss>

