<?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; nj_garg</title>
	<atom:link href="https://www.emblogic.com/blog/author/nj_garg/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>how to take string as input from the user ???</title>
		<link>https://www.emblogic.com/blog/07/how-to-take-string-as-input-from-the-user/</link>
		<comments>https://www.emblogic.com/blog/07/how-to-take-string-as-input-from-the-user/#comments</comments>
		<pubDate>Sun, 01 Jul 2012 11:26:33 +0000</pubDate>
		<dc:creator><![CDATA[nj_garg]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=3717</guid>
		<description><![CDATA[#include&#60;string.h&#62; #include&#60;stdio.h&#62; #include&#60;stdlib.h&#62; int main() { int d; printf(&#8220;enter size of the string\n&#8221;); scanf(&#8220;%d&#8221;,&#38;d); char a[100]; char *p; p = malloc(sizeof(char)*d); printf(&#8220;enter the string\n&#8221;); fflush(stdin); fgets(p,d,stdin);                             //didn&#8217;t worked with gets(p)????????? int i,j,count=0,flag=0; for(i=0;i&#60;=&#8221;;i++) { for(j=0;j&#60;i;j++) { if(*(p+i)==a[j]) { flag=-1; } &#8230; <a href="https://www.emblogic.com/blog/07/how-to-take-string-as-input-from-the-user/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>#include&lt;string.h&gt;<br />
#include&lt;stdio.h&gt;<br />
#include&lt;stdlib.h&gt;</p>
<p>int main()<br />
{<br />
int d;<br />
printf(&#8220;enter size of the string\n&#8221;);<br />
scanf(&#8220;%d&#8221;,&amp;d);<br />
char a[100];<br />
char *p;<br />
p = malloc(sizeof(char)*d);</p>
<p>printf(&#8220;enter the string\n&#8221;);<br />
fflush(stdin);<br />
fgets(p,d,stdin);                             //didn&#8217;t worked with gets(p)?????????<br />
int i,j,count=0,flag=0;<br />
for(i=0;i&lt;=&#8221;;i++)<br />
{<br />
for(j=0;j&lt;i;j++)<br />
{<br />
if(*(p+i)==a[j])<br />
{<br />
flag=-1;<br />
}<br />
}<br />
if(flag==0)<br />
{<br />
a[count++]=*(p+i);<br />
}<br />
flag=0;<br />
}<br />
printf(&#8220;modified array is \n&#8221;);<br />
for(j=0;j&lt;&#8221;;j++)<br />
{<br />
printf(&#8220;%c&#8221;,a[j]);<br />
}<br />
}</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/07/how-to-take-string-as-input-from-the-user/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>todays work</title>
		<link>https://www.emblogic.com/blog/06/todays-work-9/</link>
		<comments>https://www.emblogic.com/blog/06/todays-work-9/#comments</comments>
		<pubDate>Tue, 19 Jun 2012 11:44:30 +0000</pubDate>
		<dc:creator><![CDATA[nj_garg]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=3371</guid>
		<description><![CDATA[program of scripting (password entry) pswrd=secret count=0 while (:) do while ($count!=3) do echo Enter Password read pss if [$pss!=$pswrd] then echo incorrect password try again else echo welcome fi `expr $count + 1` done echo want to change the &#8230; <a href="https://www.emblogic.com/blog/06/todays-work-9/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>program of scripting (password entry)<br />
pswrd=secret</p>
<p>count=0</p>
<p>while (:)</p>
<p>do</p>
<p>while ($count!=3)</p>
<p>do</p>
<p>echo Enter Password</p>
<p>read pss</p>
<p>if [$pss!=$pswrd]</p>
<p>then</p>
<p>echo incorrect password try again</p>
<p>else</p>
<p>echo welcome</p>
<p>fi</p>
<p>`expr $count + 1`</p>
<p>done</p>
<p>echo want to change the password press y or n</p>
<p>read change</p>
<p>case $change in</p>
<p>yes|y|YES|Yes )</p>
<p>echo &#8220;Enter New Password&#8221;</p>
<p>read pswrd;;</p>
<p>[nN]* )</p>
<p>echo as you wish ;;</p>
<p>* ) echo &#8220;wrong choice&#8221;;;</p>
<p>esac</p>
<p>echo want to exit press y or n</p>
<p>read terminate</p>
<p>case $terminate in</p>
<p>yes|Y|y|YES )</p>
<p>echo BYE</p>
<p>exit 0;;</p>
<p>[nN]* )</p>
<p>echo welcome again;;</p>
<p>* ) echo wrong choice;;</p>
<p>esac</p>
<p>done</p>
<p>exit 0</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<br />
error in first nested loop  ??????????</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/06/todays-work-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>today&#8217;s work</title>
		<link>https://www.emblogic.com/blog/06/todays-work-8/</link>
		<comments>https://www.emblogic.com/blog/06/todays-work-8/#comments</comments>
		<pubDate>Sun, 10 Jun 2012 08:32:23 +0000</pubDate>
		<dc:creator><![CDATA[nj_garg]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=3169</guid>
		<description><![CDATA[class assignment is done]]></description>
				<content:encoded><![CDATA[<p>class assignment is done</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/06/todays-work-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>assignment 2</title>
		<link>https://www.emblogic.com/blog/06/assignment-2-2/</link>
		<comments>https://www.emblogic.com/blog/06/assignment-2-2/#comments</comments>
		<pubDate>Sat, 09 Jun 2012 05:39:45 +0000</pubDate>
		<dc:creator><![CDATA[nj_garg]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=3129</guid>
		<description><![CDATA[Assignment 2 is completed except quest. 5]]></description>
				<content:encoded><![CDATA[<p>Assignment 2 is completed except quest. 5</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/06/assignment-2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Today&#8217;s work</title>
		<link>https://www.emblogic.com/blog/06/todays-work-7/</link>
		<comments>https://www.emblogic.com/blog/06/todays-work-7/#comments</comments>
		<pubDate>Fri, 08 Jun 2012 12:02:12 +0000</pubDate>
		<dc:creator><![CDATA[nj_garg]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=3111</guid>
		<description><![CDATA[Assignment 1 completed except ques. 6,4 and 24.]]></description>
				<content:encoded><![CDATA[<p>Assignment 1 completed except ques. 6,4 and 24.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/06/todays-work-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
