<?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>mythrobin•com &#187; C/C++</title>
	<atom:link href="http://www.mythrobin.com/archives/category/cc/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mythrobin.com</link>
	<description>where myth becomes real</description>
	<lastBuildDate>Sat, 21 Jan 2012 08:32:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>C program to create a Binary Tree</title>
		<link>http://www.mythrobin.com/archives/295</link>
		<comments>http://www.mythrobin.com/archives/295#comments</comments>
		<pubDate>Mon, 27 Sep 2010 13:35:43 +0000</pubDate>
		<dc:creator>Robin</dc:creator>
				<category><![CDATA[C/C++]]></category>

		<guid isPermaLink="false">http://www.mythrobin.com/?p=295</guid>
		<description><![CDATA[#include stdio.h #include stdlib.h struct node { int data; struct node *left,*right; }; void create(struct node **p,int d) { if(*p==NULL) { *p=(struct node *)malloc(sizeof(struct node));<a href="http://www.mythrobin.com/archives/295"> <br /><br /> (Read More)…</a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://images.devshed.com/ds/stories/syntactic_comparison_p1/syntactic_comparison-part1%5B1%5D_html_m60f14f27.png" alt="c" /></p>
<p><code><br />
#include stdio.h<br />
#include stdlib.h</p>
<p>struct node<br />
{<br />
 int data;<br />
 struct node *left,*right;<br />
};</p>
<p>void create(struct node **p,int d)<br />
{<br />
 if(*p==NULL)<br />
   {<br />
    *p=(struct node *)malloc(sizeof(struct node));<br />
    (*p)->data=d;<br />
    (*p)->left=NULL;<br />
    (*p)->right=NULL;<br />
   }<br />
 else<br />
   {<br />
    if(d<(*p)->data)<br />
      {<br />
       create(&#038;((*p)->left),d);<br />
      }<br />
    else<br />
      {<br />
       create(&#038;((*p)->right),d);<br />
      }<br />
   }<br />
}</p>
<p>void preorder(struct node *p)<br />
{<br />
 if(p!=NULL)<br />
   {<br />
    printf("\n%d",p->data);<br />
    preorder(p->left);<br />
    preorder(p->right);<br />
   }<br />
}</p>
<p>void postorder(struct node *p)<br />
{<br />
 if(p!=NULL)<br />
   {<br />
    postorder(p->left);<br />
    postorder(p->right);<br />
    printf("\n%d",p->data);<br />
   }<br />
}</p>
<p>void copy(struct node *rt,struct node **p)<br />
{<br />
 if(rt!=NULL)<br />
   {<br />
    *p=(struct node *)malloc(sizeof(struct node));<br />
    (*p)->data=rt->data;<br />
    (*p)->left=rt->left;<br />
    (*p)->right=rt->right;<br />
    copy(rt->left,&#038;((*p)->left));<br />
    copy(rt->right,&#038;((*p)->right));<br />
   }<br />
}</p>
<p>void main()<br />
{<br />
 struct node *first=NULL;<br />
 int ch,d;<br />
 do<br />
  {<br />
   printf("\nenter your choice:\n");<br />
   printf("1.create binary tree\n2.preorder\n3.postorder\n4.exit\n");<br />
   scanf("%d",&#038;ch);<br />
   switch(ch)<br />
    {<br />
     case 1: printf("\nenter data:");<br />
             scanf("%d",&#038;d);<br />
             create(&#038;first,d);<br />
             break;</p>
<p>     case 2: preorder(first);<br />
             break;</p>
<p>     case 3: postorder(first);<br />
             break;<br />
    }<br />
  }<br />
 while(ch!=4);<br />
}</p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mythrobin.com/archives/295/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Find Odd or Even Number in C</title>
		<link>http://www.mythrobin.com/archives/293</link>
		<comments>http://www.mythrobin.com/archives/293#comments</comments>
		<pubDate>Mon, 27 Sep 2010 13:33:08 +0000</pubDate>
		<dc:creator>Robin</dc:creator>
				<category><![CDATA[C/C++]]></category>

		<guid isPermaLink="false">http://www.mythrobin.com/?p=293</guid>
		<description><![CDATA[#include stdio.h #include conio.h void main() { int a; printf("Enter your number: "); scanf("%d",&#038;a); if(a%2 == 0) { printf("Number is Even"); } else { printf("Number<a href="http://www.mythrobin.com/archives/293"> <br /><br /> (Read More)…</a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://images.devshed.com/ds/stories/syntactic_comparison_p1/syntactic_comparison-part1%5B1%5D_html_m60f14f27.png" alt="c" /></p>
<p><code><br />
#include stdio.h<br />
#include conio.h</p>
<p>void main()<br />
{<br />
int a;<br />
printf("Enter your number: ");<br />
scanf("%d",&#038;a);</p>
<p>if(a%2 == 0)</p>
<p>{<br />
printf("Number is Even");<br />
}</p>
<p>else<br />
{<br />
printf("Number is ODD");<br />
}</p>
<p>getch();</p>
<p>}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mythrobin.com/archives/293/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Program to find Leap Year in C</title>
		<link>http://www.mythrobin.com/archives/291</link>
		<comments>http://www.mythrobin.com/archives/291#comments</comments>
		<pubDate>Mon, 27 Sep 2010 13:30:52 +0000</pubDate>
		<dc:creator>Robin</dc:creator>
				<category><![CDATA[C/C++]]></category>

		<guid isPermaLink="false">http://www.mythrobin.com/?p=291</guid>
		<description><![CDATA[#include stdio.h int main() { int year; printf("Enter year\t"); scanf("%d",&#038;year); if (((year%4==0) &#038;&#038; (year%100!=0))&#124;&#124;(year%400==0)) printf("Leap Year \n"); else printf("Not a Leap Year \n"); }]]></description>
			<content:encoded><![CDATA[<p><img src="http://images.devshed.com/ds/stories/syntactic_comparison_p1/syntactic_comparison-part1%5B1%5D_html_m60f14f27.png" alt="c" /></p>
<p><code><br />
#include stdio.h<br />
int main()<br />
{<br />
int year;<br />
printf("Enter year\t");<br />
scanf("%d",&#038;year);</p>
<p>if (((year%4==0) &#038;&#038; (year%100!=0))||(year%400==0))</p>
<p>printf("Leap Year \n");<br />
else<br />
printf("Not a Leap Year \n");<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mythrobin.com/archives/291/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C Program to generate Fibonacci Series</title>
		<link>http://www.mythrobin.com/archives/289</link>
		<comments>http://www.mythrobin.com/archives/289#comments</comments>
		<pubDate>Mon, 27 Sep 2010 13:27:26 +0000</pubDate>
		<dc:creator>Robin</dc:creator>
				<category><![CDATA[C/C++]]></category>

		<guid isPermaLink="false">http://www.mythrobin.com/?p=289</guid>
		<description><![CDATA[#include stdio.h void main() { int OldNum, NewNum, FibNum, MaxNum; printf("Generate Fibonacci Numbers till what number? "); scanf("%d", &#038;MaxNum); OldNum=0; NewNum=1; FibNum = OldNum +<a href="http://www.mythrobin.com/archives/289"> <br /><br /> (Read More)…</a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://images.devshed.com/ds/stories/syntactic_comparison_p1/syntactic_comparison-part1%5B1%5D_html_m60f14f27.png" alt="c" /></p>
<p><code><br />
#include stdio.h</p>
<p>void main()<br />
{<br />
   int OldNum, NewNum, FibNum, MaxNum;<br />
  printf("Generate Fibonacci Numbers till what number? ");<br />
   scanf("%d", &#038;MaxNum);</p>
<p>   OldNum=0;<br />
   NewNum=1;<br />
   FibNum = OldNum + NewNum;</p>
<p>   printf("%d, %d, %d, ", OldNum, NewNum, FibNum);</p>
<p>   for(;;)<br />
   {<br />
      OldNum = NewNum;<br />
      NewNum = FibNum;<br />
      FibNum = OldNum + NewNum;<br />
      if(FibNum > MaxNum)<br />
      {<br />
         printf("");<br />
         exit(1);<br />
      }<br />
      printf("%d, ", FibNum);<br />
   }<br />
}</p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mythrobin.com/archives/289/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

