<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-980280126094476813.comments</id><updated>2009-09-29T21:59:42.480+05:30</updated><title type='text'>Interesting C Programs</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://interestingcprograms.blogspot.com/feeds/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/comments/default'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/'/><author><name>Balaji V</name><uri>http://www.blogger.com/profile/18130457055508729339</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-7059057826221120735</id><published>2009-09-28T16:18:42.723+05:30</published><updated>2009-09-28T16:18:42.723+05:30</updated><title type='text'>If you include the header file, the code can be li...</title><content type='html'>If you include the header file, the code can be like this.&lt;br /&gt;&lt;br /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;char *s=&amp;quot;#include &amp;lt;stdio.h&amp;gt;%cchar *s=%c%s%c;%cmain(){printf(s,10,34,s,34,10,10);}%c&amp;quot;;&lt;br /&gt;main(){printf(s,10,34,s,34,10,10);}</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/7489741095742660277/comments/default/7059057826221120735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/7489741095742660277/comments/default/7059057826221120735'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2007/07/interesting-c-program-10.html?showComment=1254134922723#c7059057826221120735' title=''/><author><name>Peak</name><uri>http://www.blogger.com/profile/01305172947899275090</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2007/07/interesting-c-program-10.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-7489741095742660277' source='http://www.blogger.com/feeds/980280126094476813/posts/default/7489741095742660277' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-8379276773372991404</id><published>2009-06-20T16:23:52.362+05:30</published><updated>2009-06-20T16:23:52.362+05:30</updated><title type='text'>Super Balaji, Keep it up.</title><content type='html'>Super Balaji, Keep it up.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/8379276773372991404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/8379276773372991404'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html?showComment=1245495232362#c8379276773372991404' title=''/><author><name>madhav</name><uri>http://www.blogger.com/profile/10488217897135746659</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-4431533622007486153' source='http://www.blogger.com/feeds/980280126094476813/posts/default/4431533622007486153' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-8356594880803390087</id><published>2009-06-18T18:18:14.278+05:30</published><updated>2009-06-18T18:18:14.278+05:30</updated><title type='text'>nice explanation Balaji,
  I never seen such an ex...</title><content type='html'>nice explanation Balaji,&lt;br /&gt;  I never seen such an explanation, which clears difference between different style of coding. This gives good direction to the freshers who are interested to work with Micro controllers.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/8356594880803390087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/8356594880803390087'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html?showComment=1245329294278#c8356594880803390087' title=''/><author><name>SATHEESH</name><uri>http://www.blogger.com/profile/09779857935741546561</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-4431533622007486153' source='http://www.blogger.com/feeds/980280126094476813/posts/default/4431533622007486153' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-5033341167542662585</id><published>2009-06-17T22:31:28.729+05:30</published><updated>2009-06-17T22:31:28.729+05:30</updated><title type='text'>Sure Salman. Will do update my blog frequently. 
B...</title><content type='html'>Sure Salman. Will do update my blog frequently. &lt;br /&gt;Balaji.V</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/5033341167542662585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/5033341167542662585'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html?showComment=1245258088729#c5033341167542662585' title=''/><author><name>Balaji V</name><uri>http://www.blogger.com/profile/18130457055508729339</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07414351048312798787'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-4431533622007486153' source='http://www.blogger.com/feeds/980280126094476813/posts/default/4431533622007486153' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-6688499467923925789</id><published>2009-06-17T18:49:52.391+05:30</published><updated>2009-06-17T18:49:52.391+05:30</updated><title type='text'>Awesome article I love reading the reviews.But If ...</title><content type='html'>Awesome article I love reading the reviews.But If you update your blog regularly it will be more nice&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Salman&lt;br /&gt;www.tips4blogging.co.cc</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/6688499467923925789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/6688499467923925789'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html?showComment=1245244792391#c6688499467923925789' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-4431533622007486153' source='http://www.blogger.com/feeds/980280126094476813/posts/default/4431533622007486153' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-8677245051602565683</id><published>2009-06-13T17:50:10.330+05:30</published><updated>2009-06-13T17:50:10.330+05:30</updated><title type='text'>Great analysis on fundamental concepts of clock pu...</title><content type='html'>Great analysis on fundamental concepts of clock pulses.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/8677245051602565683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/8677245051602565683'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html?showComment=1244895610330#c8677245051602565683' title=''/><author><name>JANANI</name><uri>http://www.blogger.com/profile/02367832069712504436</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-4431533622007486153' source='http://www.blogger.com/feeds/980280126094476813/posts/default/4431533622007486153' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-876966284395170703</id><published>2009-06-13T17:40:31.520+05:30</published><updated>2009-06-13T17:40:31.520+05:30</updated><title type='text'>Nice work. Need to bring out such information on a...</title><content type='html'>Nice work. Need to bring out such information on a weekly basis.&lt;br /&gt;&lt;br /&gt;-Mohan</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/876966284395170703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/876966284395170703'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html?showComment=1244895031520#c876966284395170703' title=''/><author><name>Lakshmi Mohan</name><uri>http://www.blogger.com/profile/00252846780466951760</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-4431533622007486153' source='http://www.blogger.com/feeds/980280126094476813/posts/default/4431533622007486153' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-2926395107183005657</id><published>2009-06-10T11:47:30.100+05:30</published><updated>2009-06-10T11:47:30.100+05:30</updated><title type='text'>That is nice.. does throw a light on some interest...</title><content type='html'>That is nice.. does throw a light on some interesting aspects!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/2926395107183005657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/2926395107183005657'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html?showComment=1244614650100#c2926395107183005657' title=''/><author><name>Abhishek</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-4431533622007486153' source='http://www.blogger.com/feeds/980280126094476813/posts/default/4431533622007486153' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-5848770275972854321</id><published>2009-06-05T14:45:41.217+05:30</published><updated>2009-06-05T14:45:41.217+05:30</updated><title type='text'>Awesome Article Balaji.
You Keep Excavating behind...</title><content type='html'>Awesome Article Balaji.&lt;br /&gt;You Keep Excavating behind the scene stuffs. This article really teaches a lesson for the way a code to be written and the significance of each method.&lt;br /&gt;&lt;br /&gt;Brilliant Stuff !!!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/5848770275972854321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/5848770275972854321'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html?showComment=1244193341217#c5848770275972854321' title=''/><author><name>Balamurugan</name><uri>http://www.blogger.com/profile/13245918291149190372</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-4431533622007486153' source='http://www.blogger.com/feeds/980280126094476813/posts/default/4431533622007486153' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-7206592617210462850</id><published>2009-06-04T23:42:25.926+05:30</published><updated>2009-06-04T23:42:25.926+05:30</updated><title type='text'>A thoughtful fundamental analysis.

I sincerely ho...</title><content type='html'>A thoughtful fundamental analysis.&lt;br /&gt;&lt;br /&gt;I sincerely hope that college students should take inspiration from your work and turn their otherwise mundane theoretical concepts into an interesting one.&lt;br /&gt;&lt;br /&gt;GOOD WORK!! HOPE TO SEE MORE FROM U!!!&lt;br /&gt;&lt;br /&gt;NOTE: Good coherent presentation of the article...</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/7206592617210462850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/4431533622007486153/comments/default/7206592617210462850'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html?showComment=1244139145926#c7206592617210462850' title=''/><author><name>Bhadri</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2009/06/cracking-myths-behind-microcontroller.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-4431533622007486153' source='http://www.blogger.com/feeds/980280126094476813/posts/default/4431533622007486153' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-4522290375599902549</id><published>2008-12-28T12:06:00.000+05:30</published><updated>2008-12-28T12:06:00.000+05:30</updated><title type='text'>Thanks for your comments Rohit.</title><content type='html'>Thanks for your comments Rohit.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/3334599308982752694/comments/default/4522290375599902549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/3334599308982752694/comments/default/4522290375599902549'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2008/12/interesting-c-program-23_09.html?showComment=1230446160000#c4522290375599902549' title=''/><author><name>Balaji V</name><uri>http://www.blogger.com/profile/18130457055508729339</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07414351048312798787'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2008/12/interesting-c-program-23_09.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-3334599308982752694' source='http://www.blogger.com/feeds/980280126094476813/posts/default/3334599308982752694' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-8335096565102103254</id><published>2008-12-28T09:45:00.000+05:30</published><updated>2008-12-28T09:45:00.000+05:30</updated><title type='text'>BTW, its just a modified version of your code.</title><content type='html'>BTW, its just a modified version of your code.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/3334599308982752694/comments/default/8335096565102103254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/3334599308982752694/comments/default/8335096565102103254'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2008/12/interesting-c-program-23_09.html?showComment=1230437700000#c8335096565102103254' title=''/><author><name>RNE18145</name><uri>http://www.blogger.com/profile/04190597770391965035</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2008/12/interesting-c-program-23_09.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-3334599308982752694' source='http://www.blogger.com/feeds/980280126094476813/posts/default/3334599308982752694' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-7296723329330792529</id><published>2008-12-28T09:44:00.000+05:30</published><updated>2008-12-28T09:44:00.000+05:30</updated><title type='text'>Hi Balaji,    You could try this code. I haven't t...</title><content type='html'>Hi Balaji,&lt;BR/&gt;    You could try this code. I haven&amp;#39;t tested it as process invocation is different on Windows. This can accept upto &amp;#39;n&amp;#39; params if your compiler supports an array overloading for execlp() as shown in this link: http://docs.sun.com/app/docs/doc/816-5167/execlp-2?a=view&lt;BR/&gt;&lt;BR/&gt;Sadly this interface eats up all tabs. You&amp;#39;ll have to reindent the code for better clarity.&lt;BR/&gt;&lt;BR/&gt;  &lt;BR/&gt;#include &amp;quot;stdio.h&amp;quot;&lt;BR/&gt;#include &amp;quot;stdlib.h&amp;quot;&lt;BR/&gt;#include &amp;quot;unistd.h&amp;quot;&lt;BR/&gt;#include &amp;quot;sys/wait.h&amp;quot;&lt;BR/&gt;&lt;BR/&gt;/* &lt;BR/&gt; * Keep a global variable for the length of the char array whose length was&lt;BR/&gt; * calculated most recently.&lt;BR/&gt; */&lt;BR/&gt;int Length = 0;&lt;BR/&gt;&lt;BR/&gt;/* &lt;BR/&gt; * Be careful when you use functional MACROs as they can screw your local &lt;BR/&gt; * scope if you have a variable with the same name as your control handle. &lt;BR/&gt; * Also, avoid these in multi-threaded programs.&lt;BR/&gt; */&lt;BR/&gt;# define CALCHARARRAYLENGTH(arr) \&lt;BR/&gt;         for(Length = 0; arr[Length] != 0; Length ++) ; &lt;BR/&gt;&lt;BR/&gt;# define ArrayLength 0x7F&lt;BR/&gt;# define MaxParams 0x10 &lt;BR/&gt;&lt;BR/&gt;/* You could do this in a better fashion using pointers. It wouldn&amp;#39;t &lt;BR/&gt; * hog so much memory.&lt;BR/&gt; */&lt;BR/&gt;struct{&lt;BR/&gt; char Command[ArrayLength];&lt;BR/&gt; int NoOfStrings;&lt;BR/&gt; char Params[MaxParams][ArrayLength];&lt;BR/&gt;} CommandSplit;&lt;BR/&gt;&lt;BR/&gt;int read_command(void);&lt;BR/&gt;&lt;BR/&gt;void init_process(void);&lt;BR/&gt;&lt;BR/&gt;void trim(char []);&lt;BR/&gt;&lt;BR/&gt;void split_command(char []);&lt;BR/&gt;&lt;BR/&gt;void execute();&lt;BR/&gt;&lt;BR/&gt;int main()&lt;BR/&gt;{&lt;BR/&gt; char * prompt = &amp;quot;[Balaji]&amp;gt;&amp;quot;;&lt;BR/&gt; while(1)&lt;BR/&gt; {&lt;BR/&gt;  printf(&amp;quot;\n%s&amp;quot;, prompt);&lt;BR/&gt;  if(!read_command())&lt;BR/&gt;        {&lt;BR/&gt;     continue;&lt;BR/&gt;        }&lt;BR/&gt;  execute();&lt;BR/&gt; }&lt;BR/&gt;}&lt;BR/&gt;&lt;BR/&gt;void init_process(void)&lt;BR/&gt;{&lt;BR/&gt; int status;&lt;BR/&gt; if(fork()!=0)&lt;BR/&gt; {&lt;BR/&gt;  //waitpid(-1,&amp;amp;status,0);&lt;BR/&gt;  wait(&amp;amp;status);&lt;BR/&gt; }&lt;BR/&gt;}&lt;BR/&gt;&lt;BR/&gt;int read_command(void)&lt;BR/&gt;{&lt;BR/&gt; char InputData[ArrayLength]; &lt;BR/&gt; int InputDataLength;&lt;BR/&gt; gets(InputData);&lt;BR/&gt; trim(InputData);&lt;BR/&gt; CALCHARARRAYLENGTH(InputData);&lt;BR/&gt; InputDataLength = Length;&lt;BR/&gt; if(InputDataLength != 0)&lt;BR/&gt; {&lt;BR/&gt;  split_command (InputData);&lt;BR/&gt; }&lt;BR/&gt; return InputDataLength;&lt;BR/&gt;} &lt;BR/&gt;&lt;BR/&gt;/*&lt;BR/&gt; * Removes control characters from both ends of this string&lt;BR/&gt; */&lt;BR/&gt;void trim (char String[])&lt;BR/&gt;{&lt;BR/&gt; int i = 0;&lt;BR/&gt; int j = 0;&lt;BR/&gt; CALCHARARRAYLENGTH(String);&lt;BR/&gt; int StringLength = Length;&lt;BR/&gt; &lt;BR/&gt; /*&lt;BR/&gt;  * Remove control characters from the begining of the string&lt;BR/&gt;  */&lt;BR/&gt; for(i = 0; i &amp;lt; StringLength; i ++)&lt;BR/&gt; {&lt;BR/&gt;  if(String[i] &amp;gt; 0x20)&lt;BR/&gt;  {&lt;BR/&gt;   break;&lt;BR/&gt;  }&lt;BR/&gt;  &lt;BR/&gt;  for(j = i; j &amp;lt; StringLength; j ++)&lt;BR/&gt;  {&lt;BR/&gt;   String[j] = String[j + 1];&lt;BR/&gt;  }&lt;BR/&gt;  StringLength --;&lt;BR/&gt; }&lt;BR/&gt; &lt;BR/&gt; /*&lt;BR/&gt;  * Remove control characters from the end of the string&lt;BR/&gt;  */&lt;BR/&gt; for(i = StringLength - 1; i &amp;gt;= 0; i --)&lt;BR/&gt; {&lt;BR/&gt;  if(String[i] &amp;gt; 0x20)&lt;BR/&gt;  {&lt;BR/&gt;   break;&lt;BR/&gt;  }&lt;BR/&gt;  StringLength --;&lt;BR/&gt; }&lt;BR/&gt; String[StringLength] = 0;&lt;BR/&gt;}&lt;BR/&gt;&lt;BR/&gt;/*&lt;BR/&gt; * Splits this command using the structure defined above.&lt;BR/&gt; */&lt;BR/&gt;void split_command(char Command[])&lt;BR/&gt;{&lt;BR/&gt; int i;&lt;BR/&gt; int j;&lt;BR/&gt; int NoOfParams = 0;&lt;BR/&gt; CommandSplit.Command[0] = 0;&lt;BR/&gt; while(1){&lt;BR/&gt;       char TempString[ArrayLength];&lt;BR/&gt;     trim(Command);&lt;BR/&gt;     CALCHARARRAYLENGTH(Command);&lt;BR/&gt;     int CommandLength = Length;&lt;BR/&gt;     &lt;BR/&gt;     if(! CommandLength)&lt;BR/&gt;     {&lt;BR/&gt;             break;&lt;BR/&gt;        }&lt;BR/&gt;     for(i = 0; i &amp;lt; CommandLength; i ++)&lt;BR/&gt;     {&lt;BR/&gt;            TempString[i] = Command[i];&lt;BR/&gt;      if(Command[i] &amp;lt;= 0x20)&lt;BR/&gt;      {&lt;BR/&gt;                break;&lt;BR/&gt;            }&lt;BR/&gt;        }&lt;BR/&gt;     TempString[i] = 0;&lt;BR/&gt;     CALCHARARRAYLENGTH(Command);&lt;BR/&gt;     if(CommandSplit.Command[0] == 0)&lt;BR/&gt;     {&lt;BR/&gt;             for(i = 0; i &amp;lt;= Length; i ++)&lt;BR/&gt;             {&lt;BR/&gt;                   CommandSplit.Command[i] = TempString [i];&lt;BR/&gt;             }&lt;BR/&gt;     } &lt;BR/&gt;     else&lt;BR/&gt;     {&lt;BR/&gt;             for(i = 0; i &amp;lt;= Length; i ++)&lt;BR/&gt;             {&lt;BR/&gt;                   CommandSplit.Params[NoOfParams][i] = TempString [i];&lt;BR/&gt;             }&lt;BR/&gt;             NoOfParams ++;&lt;BR/&gt;     }&lt;BR/&gt;        for(j = 0; j + i  &amp;lt; CommandLength; j ++)&lt;BR/&gt;  {&lt;BR/&gt;   Command[j] = Command[i + j];&lt;BR/&gt;  }&lt;BR/&gt;  Command[j] = 0;&lt;BR/&gt;    }&lt;BR/&gt;    for(i = NoOfParams + 1; i &amp;lt; MaxParams; i ++)&lt;BR/&gt; {&lt;BR/&gt;  CommandSplit.Params[i][0] = 0;&lt;BR/&gt; }&lt;BR/&gt;&lt;BR/&gt;}&lt;BR/&gt;&lt;BR/&gt;void execute()&lt;BR/&gt;{&lt;BR/&gt; &lt;BR/&gt; init_process();&lt;BR/&gt;&lt;BR/&gt;    execlp(CommandSplit.Command,CommandSplit.Command,CommandSplit.Params);&lt;BR/&gt;}&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;Cheers!!!&lt;BR/&gt;Rohit</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/3334599308982752694/comments/default/7296723329330792529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/3334599308982752694/comments/default/7296723329330792529'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2008/12/interesting-c-program-23_09.html?showComment=1230437640000#c7296723329330792529' title=''/><author><name>RNE18145</name><uri>http://www.blogger.com/profile/04190597770391965035</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2008/12/interesting-c-program-23_09.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-3334599308982752694' source='http://www.blogger.com/feeds/980280126094476813/posts/default/3334599308982752694' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-59285229909779632</id><published>2007-12-05T12:02:00.000+05:30</published><updated>2007-12-05T12:02:00.000+05:30</updated><title type='text'>When the optimization is turned off, the compiler ...</title><content type='html'>When the optimization is turned off, the compiler will check the conditional statements and if there is a const value then it will act smartly, otherwise if the variable is not a constant then it will throw the warning since the value of the variable will be referred during the runtime. You may know that the const keyword doesn't make a variable constant instead it makes read-only. So even in your case 'const int a = 0' will not work as u expect. Try using macro... it will work because it make the variable as constant. Correct me if i'm wrong</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/1449061045074149225/comments/default/59285229909779632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/1449061045074149225/comments/default/59285229909779632'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2007/12/interesting-c-program-19.html?showComment=1196836320000#c59285229909779632' title=''/><author><name>srsasi</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2007/12/interesting-c-program-19.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-1449061045074149225' source='http://www.blogger.com/feeds/980280126094476813/posts/default/1449061045074149225' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-1396386432033888870</id><published>2007-11-07T11:45:00.000+05:30</published><updated>2007-11-07T11:45:00.000+05:30</updated><title type='text'>Thanks for sharing the knowledge with me.</title><content type='html'>Thanks for sharing the knowledge with me.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/8230063294152599153/comments/default/1396386432033888870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/8230063294152599153/comments/default/1396386432033888870'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2007/10/interesting-c-program-18.html?showComment=1194416100000#c1396386432033888870' title=''/><author><name>Balaji V</name><uri>http://www.blogger.com/profile/18130457055508729339</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07414351048312798787'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2007/10/interesting-c-program-18.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-8230063294152599153' source='http://www.blogger.com/feeds/980280126094476813/posts/default/8230063294152599153' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-3846502404104348657</id><published>2007-11-07T10:45:00.000+05:30</published><updated>2007-11-07T10:45:00.000+05:30</updated><title type='text'>Will Do that ASAP...Thanks for the comment...</title><content type='html'>Will Do that ASAP...&lt;BR/&gt;Thanks for the comment...</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/6228610748108758977/comments/default/3846502404104348657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/6228610748108758977/comments/default/3846502404104348657'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2007/10/interesting-c-program-17.html?showComment=1194412500000#c3846502404104348657' title=''/><author><name>Balaji V</name><uri>http://www.blogger.com/profile/18130457055508729339</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07414351048312798787'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2007/10/interesting-c-program-17.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-6228610748108758977' source='http://www.blogger.com/feeds/980280126094476813/posts/default/6228610748108758977' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-8703368637990564144</id><published>2007-11-07T09:25:00.000+05:30</published><updated>2007-11-07T09:25:00.000+05:30</updated><title type='text'>Hi balaji,Parts of the code are invisible. Please ...</title><content type='html'>Hi balaji,&lt;BR/&gt;&lt;BR/&gt;Parts of the code are invisible. Please do the needful to benefit the reader.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/6228610748108758977/comments/default/8703368637990564144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/6228610748108758977/comments/default/8703368637990564144'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2007/10/interesting-c-program-17.html?showComment=1194407700000#c8703368637990564144' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2007/10/interesting-c-program-17.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-6228610748108758977' source='http://www.blogger.com/feeds/980280126094476813/posts/default/6228610748108758977' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-7428508994896861241</id><published>2007-11-06T18:05:00.000+05:30</published><updated>2007-11-06T18:05:00.000+05:30</updated><title type='text'>Memory for a variable is created when it is define...</title><content type='html'>Memory for a variable is created when it is defined, not when it is referenced. Irrespective of ur pointer type, memory will be created well before assigning the pointer say float pointer to void pointer in ur code.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/8230063294152599153/comments/default/7428508994896861241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/8230063294152599153/comments/default/7428508994896861241'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2007/10/interesting-c-program-18.html?showComment=1194352500000#c7428508994896861241' title=''/><author><name>srsasi</name><uri>http://www.blogger.com/profile/14188853988245353236</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2007/10/interesting-c-program-18.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-8230063294152599153' source='http://www.blogger.com/feeds/980280126094476813/posts/default/8230063294152599153' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-7909598604394602681</id><published>2007-11-04T08:32:00.000+05:30</published><updated>2007-11-04T08:32:00.000+05:30</updated><title type='text'>I am sorry for writing a wrong code instead of the...</title><content type='html'>I am sorry for writing a wrong code instead of the intended.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/8230063294152599153/comments/default/7909598604394602681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/8230063294152599153/comments/default/7909598604394602681'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2007/10/interesting-c-program-18.html?showComment=1194145320000#c7909598604394602681' title=''/><author><name>Balaji V</name><uri>http://www.blogger.com/profile/18130457055508729339</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07414351048312798787'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2007/10/interesting-c-program-18.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-8230063294152599153' source='http://www.blogger.com/feeds/980280126094476813/posts/default/8230063294152599153' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-8473514955229961695</id><published>2007-11-01T18:43:00.000+05:30</published><updated>2007-11-01T18:43:00.000+05:30</updated><title type='text'>Nice explanation. I encountered the same problem. ...</title><content type='html'>Nice explanation. I encountered the same problem. I have a doubt. Whats the use of allowing the typecasting of different type of pointers when it is not going to work :-/ ?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/8230063294152599153/comments/default/8473514955229961695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/8230063294152599153/comments/default/8473514955229961695'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2007/10/interesting-c-program-18.html?showComment=1193922780000#c8473514955229961695' title=''/><author><name>srsasi</name><uri>http://www.blogger.com/profile/14188853988245353236</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2007/10/interesting-c-program-18.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-8230063294152599153' source='http://www.blogger.com/feeds/980280126094476813/posts/default/8230063294152599153' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-1985971982096989861</id><published>2007-07-03T09:58:00.000+05:30</published><updated>2007-07-03T09:58:00.000+05:30</updated><title type='text'>Thanx sasi, for your valuable input.Balaji.V</title><content type='html'>Thanx sasi, for your valuable input.&lt;BR/&gt;Balaji.V</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/3989536161712740342/comments/default/1985971982096989861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/3989536161712740342/comments/default/1985971982096989861'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2007/07/interesting-c-program-1.html?showComment=1183436880000#c1985971982096989861' title=''/><author><name>Balaji V</name><uri>http://www.blogger.com/profile/18130457055508729339</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='07414351048312798787'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2007/07/interesting-c-program-1.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-3989536161712740342' source='http://www.blogger.com/feeds/980280126094476813/posts/default/3989536161712740342' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-980280126094476813.post-8310928771939015863</id><published>2007-07-03T09:56:00.000+05:30</published><updated>2007-07-03T09:56:00.000+05:30</updated><title type='text'>When we compare the unsigned and signed numbers, t...</title><content type='html'>When we compare the unsigned and signed numbers, the output is compiler depended. Usually the signed no will be treated as unsigned number.&lt;BR/&gt;&lt;BR/&gt;Example:&lt;BR/&gt;&lt;BR/&gt;unsigned int No1 = 10;&lt;BR/&gt;signed int No2 = -1;&lt;BR/&gt;printf("(No2 LessThan No1):%d\n",(No2LessThanNo1));&lt;BR/&gt;&lt;BR/&gt;The output of this printf will be "ZERO" since the condition fails.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/3989536161712740342/comments/default/8310928771939015863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/980280126094476813/3989536161712740342/comments/default/8310928771939015863'/><link rel='alternate' type='text/html' href='http://interestingcprograms.blogspot.com/2007/07/interesting-c-program-1.html?showComment=1183436760000#c8310928771939015863' title=''/><author><name>srsasi</name><uri>http://www.blogger.com/profile/14188853988245353236</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://interestingcprograms.blogspot.com/2007/07/interesting-c-program-1.html' ref='tag:blogger.com,1999:blog-980280126094476813.post-3989536161712740342' source='http://www.blogger.com/feeds/980280126094476813/posts/default/3989536161712740342' type='text/html'/></entry></feed>