<?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; akanksha.tyagi238</title>
	<atom:link href="https://www.emblogic.com/blog/author/akanksha-tyagi238/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>This is a program of adding two distances in feet and inches and then converted their sum in meters and cm using functions.</title>
		<link>https://www.emblogic.com/blog/03/this-is-a-program-of-adding-two-distances-in-feet-and-inches-and-then-converted-their-sum-in-meters-and-cm-using-functions/</link>
		<comments>https://www.emblogic.com/blog/03/this-is-a-program-of-adding-two-distances-in-feet-and-inches-and-then-converted-their-sum-in-meters-and-cm-using-functions/#comments</comments>
		<pubDate>Wed, 26 Mar 2014 08:33:39 +0000</pubDate>
		<dc:creator><![CDATA[akanksha.tyagi238]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9501</guid>
		<description><![CDATA[1 #include&#60;stdio.h&#62; 2 struct distance 3 { 4 int inch; 5 int feet; 6 float meter; 7 float cm; 8 }; 9 void input(struct distance *,struct distance *); 10 int addist(struct distance *,struct distance *,struct distance *); 11 void display(struct &#8230; <a href="https://www.emblogic.com/blog/03/this-is-a-program-of-adding-two-distances-in-feet-and-inches-and-then-converted-their-sum-in-meters-and-cm-using-functions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>1 #include&lt;stdio.h&gt;<br />
2 struct distance<br />
3 {<br />
4 int inch;<br />
5 int feet;<br />
6 float meter;<br />
7 float cm;<br />
8 };<br />
9 void input(struct distance *,struct distance *);<br />
10 int addist(struct distance *,struct distance *,struct distance *);<br />
11 void display(struct distance *);<br />
12 void convert(struct distance *);<br />
13 int main()<br />
14 {<br />
15 struct distance d1,d2,d;<br />
16 input(&amp;d1,&amp;d2);<br />
17 addist(&amp;d1,&amp;d2,&amp;d);<br />
18 display(&amp;d);<br />
19 convert(&amp;d);<br />
20 return 0;<br />
21 }<br />
22 void input(struct distance *d1,struct distance *d2)<br />
23 {<br />
24 printf(&#8220;enter the distance in feet and inches\n&#8221;);<br />
25 printf(&#8220;enter the 1st distance\n&#8221;);<br />
26 scanf(&#8220;%d %d&#8221;,&amp;d1-&gt;inch,&amp;d1-&gt;feet);<br />
27 printf(&#8220;enter the 2nd distance\n&#8221;);<br />
28 scanf(&#8220;%d %d&#8221;,&amp;d2-&gt;inch,&amp;d2-&gt;feet);<br />
29 }<br />
30 int addist(struct distance *d1,struct distance *d2,struct distance *d)<br />
31    {<br />
32 (d-&gt;feet)=(d1-&gt;feet)+(d2-&gt;feet);<br />
33 (d-&gt;inch)=(d1-&gt;inch)+(d2-&gt;inch);<br />
34 if((d-&gt;inch)&gt;12)<br />
35 {<br />
36 (d-&gt;inch)=(d-&gt;inch)-12;<br />
37 (d-&gt;feet)=(d-&gt;feet)+1;<br />
38 }<br />
39 }<br />
40 void display(struct distance *d)<br />
41 {<br />
42 printf(&#8220;sum of two distances in feet and inches\n&#8221;);<br />
43 printf(&#8220;sum = %d feet %d inches\n&#8221;,d-&gt;feet,d-&gt;inch);<br />
44 }<br />
45 void convert(struct distance *d)<br />
46 {<br />
47 d-&gt;meter=(d-&gt;feet)/3.28;<br />
48 d-&gt;cm=(d-&gt;inch)/0.393;<br />
49 printf(&#8220;sum in meter and cm\n&#8221;);<br />
50 printf(&#8220;sum = %f m and %f cm\n&#8221;,d-&gt;meter,d-&gt;cm);<br />
51 }<br />
1,1           Top</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/this-is-a-program-of-adding-two-distances-in-feet-and-inches-and-then-converted-their-sum-in-meters-and-cm-using-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This is a program to compare two text.</title>
		<link>https://www.emblogic.com/blog/03/this-is-a-program-to-compare-two-text/</link>
		<comments>https://www.emblogic.com/blog/03/this-is-a-program-to-compare-two-text/#comments</comments>
		<pubDate>Wed, 19 Mar 2014 09:50:51 +0000</pubDate>
		<dc:creator><![CDATA[akanksha.tyagi238]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9152</guid>
		<description><![CDATA[head    1.1; access; symbols; locks; strict; comment    @ * @; 1.1 date    2014.03.19.15.25.02;    author emblogic;    state Exp; branches; next    ; desc @This is a program to compare two text. we have checked whether two files are identical or not with &#8230; <a href="https://www.emblogic.com/blog/03/this-is-a-program-to-compare-two-text/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>head    1.1;<br />
access;<br />
symbols;<br />
locks; strict;<br />
comment    @ * @;</p>
<p>1.1<br />
date    2014.03.19.15.25.02;    author emblogic;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@This is a program to compare two text.<br />
we have checked whether two files are identical or not with the help of function fopen and fgetc.<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision<br />
@<br />
text<br />
@#include&lt;stdio.h&gt;<br />
#include&lt;string.h&gt;<br />
int main()<br />
{<br />
FILE *f1,*f2;<br />
char ch1,ch2;<br />
f1=fopen(&#8220;file5&#8243;,&#8221;r&#8221;);<br />
f2=fopen(&#8220;file4&#8243;,&#8221;r&#8221;);<br />
do<br />
{<br />
ch1=getc(f1);<br />
ch2=getc(f2);<br />
if(ch1==ch2)<br />
{<br />
if(ch1==10 &amp;&amp; ch2==10)<br />
printf(&#8220;both files are equal&#8221;);<br />
}<br />
else<br />
{<br />
printf(&#8220;files are not equal&#8221;);<br />
break;<br />
}<br />
}<br />
while(ch1!=10 &amp;&amp; ch2!=10);<br />
return 0;<br />
}<br />
@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/this-is-a-program-to-compare-two-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This is a program to read last n characters from the file.</title>
		<link>https://www.emblogic.com/blog/03/this-is-a-program-to-read-last-n-characters-from-the-file/</link>
		<comments>https://www.emblogic.com/blog/03/this-is-a-program-to-read-last-n-characters-from-the-file/#comments</comments>
		<pubDate>Wed, 19 Mar 2014 09:25:31 +0000</pubDate>
		<dc:creator><![CDATA[akanksha.tyagi238]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9146</guid>
		<description><![CDATA[head    1.1; access; symbols; locks; strict; comment    @ * @; 1.1 date    2014.03.19.15.00.37;    author emblogic;    state Exp; branches; next    ; desc @this is a program to read last n chararcter from the file. @ 1.1 log @Initial revision @ text &#8230; <a href="https://www.emblogic.com/blog/03/this-is-a-program-to-read-last-n-characters-from-the-file/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>head    1.1;<br />
access;<br />
symbols;<br />
locks; strict;<br />
comment    @ * @;</p>
<p>1.1<br />
date    2014.03.19.15.00.37;    author emblogic;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@this is a program to read last n chararcter from the file.<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision<br />
@<br />
text<br />
@#include&lt;stdio.h&gt;<br />
#include&lt;string.h&gt;<br />
int main()<br />
{<br />
FILE *f1;<br />
int pos,n;<br />
char ch;<br />
printf(&#8220;enter the value of n&#8221;);<br />
scanf(&#8220;%d&#8221;,&amp;n);<br />
f1=fopen(&#8220;file3&#8243;,&#8221;r&#8221;);<br />
//getc(f1);<br />
fseek(f1,0,SEEK_END);<br />
fseek(f1,n,SEEK_SET);<br />
pos=ftell(f1);<br />
printf(&#8220;position is %d&#8221;,pos);<br />
do<br />
{<br />
ch=fgetc(f1);<br />
printf(&#8220;%c&#8221;,ch);<br />
}<br />
while(ch !=10);</p>
<p>return 0;<br />
}</p>
<p>@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/this-is-a-program-to-read-last-n-characters-from-the-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This is a program to copy the contents of one file into another using fputc.</title>
		<link>https://www.emblogic.com/blog/03/this-is-a-program-to-copy-the-contents-of-one-file-into-another-using-fputc/</link>
		<comments>https://www.emblogic.com/blog/03/this-is-a-program-to-copy-the-contents-of-one-file-into-another-using-fputc/#comments</comments>
		<pubDate>Wed, 19 Mar 2014 08:19:39 +0000</pubDate>
		<dc:creator><![CDATA[akanksha.tyagi238]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9125</guid>
		<description><![CDATA[@This is a program to copy the contents of one file into another using fputc. @ 1.1 log @Initial revision @ text @#include&#60;stdio.h&#62; int main() { FILE *fp1,*fp2; char a; fp1=fopen(&#8220;file2&#8243;,&#8221;r&#8221;); if(fp1==NULL) { puts(&#8220;cannot open this file&#8221;); goto OUT; } &#8230; <a href="https://www.emblogic.com/blog/03/this-is-a-program-to-copy-the-contents-of-one-file-into-another-using-fputc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>@This is a program to copy the contents of one file into another using fputc.<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision<br />
@<br />
text<br />
@#include&lt;stdio.h&gt;<br />
int main()<br />
{<br />
FILE *fp1,*fp2;<br />
char a;<br />
fp1=fopen(&#8220;file2&#8243;,&#8221;r&#8221;);<br />
if(fp1==NULL)<br />
{<br />
puts(&#8220;cannot open this file&#8221;);<br />
goto OUT;<br />
}<br />
fp2=fopen(&#8220;file1&#8243;,&#8221;w&#8221;);<br />
if(fp1==NULL)<br />
{<br />
puts(&#8220;cannot open this file&#8221;);<br />
goto OUT;<br />
}<br />
do<br />
{<br />
a=fgetc(fp1);<br />
fputc(a,fp2);<br />
}<br />
while(a!=EOF);</p>
<p>return 0;<br />
OUT:<br />
return -1;<br />
}<br />
@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/this-is-a-program-to-copy-the-contents-of-one-file-into-another-using-fputc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>program to print odd and even numbers using array.</title>
		<link>https://www.emblogic.com/blog/03/program-to-print-odd-and-even-numbers-using-array/</link>
		<comments>https://www.emblogic.com/blog/03/program-to-print-odd-and-even-numbers-using-array/#comments</comments>
		<pubDate>Wed, 19 Mar 2014 07:10:22 +0000</pubDate>
		<dc:creator><![CDATA[akanksha.tyagi238]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=9122</guid>
		<description><![CDATA[head    1.1; access; symbols; locks; strict; comment    @ * @; 1.1 date    2014.03.19.07.00.53;    author Emblinux;    state Exp; branches; next    ; desc @this is a program to find out even and odd numbers. @ 1.1 log @Initial revision @ text @#include&#60;stdio.h&#62; &#8230; <a href="https://www.emblogic.com/blog/03/program-to-print-odd-and-even-numbers-using-array/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>head    1.1;<br />
access;<br />
symbols;<br />
locks; strict;<br />
comment    @ * @;</p>
<p>1.1<br />
date    2014.03.19.07.00.53;    author Emblinux;    state Exp;<br />
branches;<br />
next    ;</p>
<p>desc<br />
@this is a program to find out even and odd numbers.<br />
@</p>
<p>1.1<br />
log<br />
@Initial revision<br />
@<br />
text<br />
@#include&lt;stdio.h&gt;<br />
int main()<br />
{<br />
int a[5],i,k;<br />
printf(&#8220;enter all five numbers&#8221;);<br />
for(i=0;i&lt;5;i++)<br />
scanf(&#8220;%d&#8221;,&amp;a[i]);<br />
for(k=0;k&lt;5;k++)<br />
{<br />
if(a[k]%2==0)<br />
printf(&#8220;this is even number : %d&#8221;,a[k]);<br />
else<br />
printf(&#8220;this is odd number : %d&#8221;,a[k]);<br />
}<br />
return 0;<br />
}<br />
@</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/program-to-print-odd-and-even-numbers-using-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
