<?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; c basic</title>
	<atom:link href="https://www.emblogic.com/blog/tag/c-basic/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>c programming &#8220;printf format specification&#8221;</title>
		<link>https://www.emblogic.com/blog/04/c-programming/</link>
		<comments>https://www.emblogic.com/blog/04/c-programming/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 07:10:42 +0000</pubDate>
		<dc:creator><![CDATA[Harshvardhan]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>
		<category><![CDATA[c basic]]></category>
		<category><![CDATA[syntax]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=2420</guid>
		<description><![CDATA[printf format specification: %[flag][width][.precision][modifier]&#60;type&#62; meaning of fields with e.g.,: format                                                                        output 1. flag: printf(&#8220;%7s&#8221;,&#8221;hello&#8221;);                                 spacespacehello 2. width: prinf(&#8220;%4d&#8221;,10);                                         spacespace10 3. precision: (&#8220;%.2f&#8221;,1.1412);                                                  1.41 4. modifier: h interpreted as short used with  i,d,o,u,x l interpreted as long used with i,d,o,u,x L interpreted as &#8230; <a href="https://www.emblogic.com/blog/04/c-programming/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>printf format specification:</p>
<p><strong>%[flag][width][.precision][modifier]&lt;type&gt;</strong></p>
<p>meaning of fields with e.g.,:<br />
<strong><em> format                                                                        output</em></strong><br />
1. flag: printf(&#8220;%7s&#8221;,&#8221;hello&#8221;);                                 spacespacehello</p>
<p>2. width: prinf(&#8220;%4d&#8221;,10);                                         spacespace10</p>
<p>3. precision: (&#8220;%.2f&#8221;,1.1412);                                                  1.41</p>
<p>4. modifier:</p>
<p>h interpreted as short used with  i,d,o,u,x<br />
l interpreted as long used with i,d,o,u,x<br />
L interpreted as double used with i,d,o,u,x</p>
<p>5. type: d,i,x,X as their usual meanings etc.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/04/c-programming/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>linklidt and scull</title>
		<link>https://www.emblogic.com/blog/10/linklidt-and-scull/</link>
		<comments>https://www.emblogic.com/blog/10/linklidt-and-scull/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 09:54:05 +0000</pubDate>
		<dc:creator><![CDATA[zaffer]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c basic]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=1167</guid>
		<description><![CDATA[problem is while traversing it gives the segmentation fault. #include&#60;stdio.h&#62; #include&#60;unistd.h&#62; #include&#60;stdlib.h&#62; struct linklist{ char **data; struct linklist *next; }*start,*temp,*last; int main() { int i,j,m,l; int quantams; char y; start=(struct linklist*)malloc(sizeof(struct linklist)); temp=(struct linklist*)malloc(sizeof(struct linklist)); //last-&#62;data=malloc(sizeof(char*)*); //printf(&#8220;enter the dat in &#8230; <a href="https://www.emblogic.com/blog/10/linklidt-and-scull/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>problem is while traversing it gives the segmentation fault.</p>
<p>#include&lt;stdio.h&gt;<br />
#include&lt;unistd.h&gt;<br />
#include&lt;stdlib.h&gt;</p>
<p>struct linklist{<br />
char **data;<br />
struct linklist *next;<br />
}*start,*temp,*last;<br />
int main()<br />
{<br />
int i,j,m,l;<br />
int quantams;<br />
char y;<br />
start=(struct linklist*)malloc(sizeof(struct linklist));<br />
temp=(struct linklist*)malloc(sizeof(struct linklist));<br />
//last-&gt;data=malloc(sizeof(char*)*);<br />
//printf(&#8220;enter the dat in the first node\n&#8221;);<br />
start-&gt;next=NULL;<br />
//scanf(&#8221; %d&#8221;,&amp;start-&gt;data);<br />
temp=start;<br />
j=0;<br />
printf(&#8220;do u wana linklist press y\n&#8221;);<br />
scanf(&#8221; %c&#8221;,&amp;y);<br />
while(y==&#8217;y&#8217;||y==&#8217;Y&#8217;)</p>
<p>{<br />
printf(&#8220;this is %d node\n&#8221;,j+1);<br />
last=(struct linklist*)malloc(sizeof(struct linklist));<br />
last-&gt;data=(char **)malloc(sizeof(char *));<br />
for(m=0;m&lt;=1;m++)<br />
{<br />
last-&gt;data[m]=(char*)malloc(sizeof(char));</p>
<p>for(l=0;l&lt;=1;l++)<br />
{<br />
printf(&#8220;row no %d: column no %d&#8221;,m,l);<br />
printf(&#8221; enter the information\n&#8221;);<br />
scanf(&#8220;%d&#8221;,&amp;quantams);<br />
//last-&gt;data[m][l]=quantams;<br />
*(*(last-&gt;data+m)+l)=quantams;<br />
}<br />
}<br />
last-&gt;next=NULL;<br />
printf(&#8220;last-&gt;next=NULL\n&#8221;);<br />
temp-&gt;next=last;<br />
printf(&#8220;temp-&gt;next=last\n&#8221;);<br />
temp=last;<br />
printf(&#8220;temp=last\n&#8221;);<br />
j++;<br />
printf(&#8220;do you wana continue press y or Y\n&#8221;);<br />
scanf(&#8221; %c&#8221;,&amp;y);<br />
}<br />
j=0;<br />
temp=start;<br />
while(temp-&gt;next!=NULL)<br />
{<br />
printf(&#8220;this is %d node\n&#8221;,j);<br />
for(m=0;m&lt;=1;m++)<br />
{</p>
<p>for(l=0;l&lt;=1;l++)<br />
{<br />
printf(&#8220;row no %d :: column no %d&#8221;,m,l);<br />
printf(&#8221; %d\n&#8221;,*(*(temp-&gt;data+m)+l));<br />
}<br />
}<br />
temp=temp-&gt;next;<br />
j++;<br />
}<br />
return 0;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/10/linklidt-and-scull/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
