<?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/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7111685733904506984</id><updated>2024-12-18T19:26:01.630-08:00</updated><category term="DATA STRUCTURE"/><title type='text'>For more fun and</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Aashik Manandhar</name><uri>http://www.blogger.com/profile/01226574202899596000</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi44brsgzR09u-RZYYsKqcIQziqJC1uhb-6W665JpcZ-ukUrRr-aDztvEeQVKkve_DPghpoFWGg9_mI3mYG8XvOv3k91TrRQhYckIWbvR0-IHElPHfMgpgJjy-wwxigiEw/s220/8.1822.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-4585428277864984536</id><published>2012-10-21T03:05:00.001-07:00</published><updated>2012-10-21T03:05:21.589-07:00</updated><title type='text'></title><content type='html'>hello friends..welcome back&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/4585428277864984536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2012/10/hello-friends.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/4585428277864984536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/4585428277864984536'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2012/10/hello-friends.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03851966622960643137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-361180879371816014</id><published>2011-04-21T06:53:00.000-07:00</published><updated>2011-04-21T06:56:04.639-07:00</updated><title type='text'></title><content type='html'>//concatination of two single linked list&lt;br /&gt;#include &lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;#include&lt;malloc.h&gt;&lt;br /&gt;#include&lt;stdlib.h&gt;&lt;br /&gt;struct linkedlist&lt;br /&gt;{&lt;br /&gt;  int info;&lt;br /&gt;  struct linkedlist *next;&lt;br /&gt;};&lt;br /&gt;typedef struct linkedlist NODE;&lt;br /&gt;&lt;br /&gt;NODE * create(NODE *);&lt;br /&gt;void display(NODE *);&lt;br /&gt;NODE * concatinate(NODE *,NODE *);&lt;br /&gt;NODE *head;&lt;br /&gt;NODE * node1,* node2;&lt;br /&gt;NODE start;&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt;  clrscr();&lt;br /&gt;  node1=(NODE *)malloc(sizeof(NODE));&lt;br /&gt;  printf(&quot;\n create first linked list \n&quot;);&lt;br /&gt;  node1=create(node1);&lt;br /&gt;  printf(&quot;\n first linked list is \n&quot;);&lt;br /&gt;  display(node1);&lt;br /&gt;  printf(&quot;\n create second linked list \n&quot;);&lt;br /&gt;  node2=(NODE*)malloc(sizeof(NODE));&lt;br /&gt;  node2=create(node2);&lt;br /&gt;  printf(&quot;\n second linked list is \n&quot;);&lt;br /&gt;  display(node2);&lt;br /&gt;  node1=concatinate(node1,node2);&lt;br /&gt;  printf(&quot;\n after concatination list is \n&quot;);&lt;br /&gt;  display(node1);&lt;br /&gt;  getch();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;NODE *create(NODE * list)&lt;br /&gt;{&lt;br /&gt;     int a;&lt;br /&gt;     printf(&quot;\n enter a number to add (at end press -0)--&amp;gt;&quot;);&lt;br /&gt;     scanf(&quot;%d&quot;,&amp;amp;a);&lt;br /&gt;     if(a==-0)&lt;br /&gt;     {&lt;br /&gt;        list-&amp;gt;info=a;&lt;br /&gt;        list-&amp;gt;next=NULL;&lt;br /&gt;        return (list);&lt;br /&gt;     }&lt;br /&gt;     else&lt;br /&gt;     {&lt;br /&gt;         list-&amp;gt;info=  a;&lt;br /&gt;         list-&amp;gt;next=(NODE *)malloc(sizeof(NODE));&lt;br /&gt;         create(list-&amp;gt;next);&lt;br /&gt;     }&lt;br /&gt;     return(list);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void display (NODE *node)&lt;br /&gt;{&lt;br /&gt;     printf(&quot;\n ROOT-&amp;gt;&quot;);&lt;br /&gt;     while(node-&amp;gt;next!=NULL)&lt;br /&gt;     {&lt;br /&gt;          printf(&quot;%d-&amp;gt;&quot;,node-&amp;gt;info);&lt;br /&gt;          node=node-&amp;gt;next;&lt;br /&gt;     }&lt;br /&gt;     printf(&quot;NULL&quot;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;NODE *concatinate(NODE * list1, NODE * list2)&lt;br /&gt;{&lt;br /&gt;  NODE *temp=list1;&lt;br /&gt;  while(list1-&amp;gt;next-&amp;gt;next!=NULL)&lt;br /&gt;  {&lt;br /&gt;      list1=list1-&amp;gt;next;&lt;br /&gt;  }&lt;br /&gt;  if(list1-&amp;gt;next-&amp;gt;next==NULL)&lt;br /&gt;  {&lt;br /&gt;      list1-&amp;gt;next=list2;&lt;br /&gt;    }&lt;br /&gt;    list1=temp;&lt;br /&gt;    return(list1);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/stdlib.h&gt;&lt;/malloc.h&gt;&lt;/conio.h&gt;&lt;/stdio.h&gt;</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/361180879371816014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2011/04/concatination-of-two-single-linked-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/361180879371816014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/361180879371816014'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2011/04/concatination-of-two-single-linked-list.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03851966622960643137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-8326918568786001241</id><published>2011-04-19T06:55:00.000-07:00</published><updated>2011-04-19T06:56:30.903-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DATA STRUCTURE"/><title type='text'></title><content type='html'>//quick sorting of integers&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;void sort(int a[],int first,int last)&lt;br /&gt;{&lt;br /&gt;  int temp,low,high,mid;&lt;br /&gt;  low=first;&lt;br /&gt;  high=last;&lt;br /&gt;  mid=a[(first+last)/2];&lt;br /&gt;  do&lt;br /&gt;  {&lt;br /&gt;      while(a[low] &amp;lt; mid)&lt;br /&gt;          low++;&lt;br /&gt;      while(a[high] &amp;gt; mid)&lt;br /&gt;          high--;&lt;br /&gt;      if(low &amp;lt;=high)&lt;br /&gt;      {&lt;br /&gt;         temp=a[low];&lt;br /&gt;         a[low]=a[high];&lt;br /&gt;         a[high]=temp;&lt;br /&gt;         low++;&lt;br /&gt;         high--;&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;  while(low &amp;lt;= high);&lt;br /&gt;&lt;br /&gt;  if(first &amp;lt; high)&lt;br /&gt;  {&lt;br /&gt;      sort(a,first,high);&lt;br /&gt;  }&lt;br /&gt;  if(low &amp;lt; last)&lt;br /&gt;  {&lt;br /&gt;      sort( a,low,last);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void main()      &lt;br /&gt;{&lt;br /&gt;  int a[10],i,n;&lt;br /&gt;  printf(&quot;\n enter the size of the array --&amp;gt;&quot;);&lt;br /&gt;  scanf(&quot;%d&quot;,&amp;amp;n);&lt;br /&gt;  printf(&quot;\n enter array elements one by one \n&quot;);&lt;br /&gt;  for(i=0;i&lt;n;i++) d=&quot;&quot; before=&quot;&quot; after=&quot;&quot; sorting=&quot;&quot; array=&quot;&quot; is=&quot;&quot; n=&quot;&quot; i=&quot;0;i&amp;lt;n;i++)&quot; t=&quot;&quot;&gt;&lt;/n;i++)&gt;&lt;/conio.h&gt;&lt;/stdio.h&gt;</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/8326918568786001241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2011/04/quick-sorting-of-integers-include.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/8326918568786001241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/8326918568786001241'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2011/04/quick-sorting-of-integers-include.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03851966622960643137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-2876762497743932937</id><published>2011-04-10T08:20:00.000-07:00</published><updated>2011-04-10T08:26:33.379-07:00</updated><title type='text'>To create single linked list,display it,count total no. of nodes in list and add node at any specific position....</title><content type='html'>#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;#include&lt;stdlib.h&gt;&lt;br /&gt;#include&lt;malloc.h&gt;&lt;br /&gt;  struct linked_list&lt;br /&gt;  {&lt;br /&gt;    int info;&lt;br /&gt;    struct linked_list *next;&lt;br /&gt;  };&lt;br /&gt;  typedef struct linked_list NODE;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  NODE * create (NODE *);&lt;br /&gt;  void display(NODE *);&lt;br /&gt;  int count(NODE *);&lt;br /&gt;  NODE *insert(NODE *,int);&lt;br /&gt;  NODE *search(NODE *,int);&lt;br /&gt;  NODE start;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NODE *create(NODE * node)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    char ans =&#39;y&#39;;&lt;br /&gt;    start.next=NULL;&lt;br /&gt;    node =&amp;amp;start;&lt;br /&gt;    while(ans==&#39;y&#39;)&lt;br /&gt;    {&lt;br /&gt;         node-&amp;gt;next=(NODE*)malloc(sizeof(NODE));&lt;br /&gt;         node=node-&amp;gt;next;&lt;br /&gt;         printf(&quot;\n enter a number to add-&amp;gt;&quot;);&lt;br /&gt;         scanf(&quot;%d&quot;,&amp;amp;node-&amp;gt;info);&lt;br /&gt;         node-&amp;gt;next=NULL;&lt;br /&gt;         printf(&quot;\n do you want to ad more node(y/n)&quot;);&lt;br /&gt;         scanf(&quot; %c&quot;,&amp;amp;ans);&lt;br /&gt;    }&lt;br /&gt;        return(node);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void display (NODE *node)&lt;br /&gt;{&lt;br /&gt;     node= &amp;amp;start;&lt;br /&gt;     node=node-&amp;gt;next;&lt;br /&gt;&lt;br /&gt;     printf(&quot;\n ROOT-&amp;gt;&quot;);&lt;br /&gt;     while(node!=NULL)&lt;br /&gt;     {&lt;br /&gt;          printf(&quot;%d-&amp;gt;&quot;,node-&amp;gt;info);&lt;br /&gt;          node=node-&amp;gt;next;&lt;br /&gt;     }&lt;br /&gt;     printf(&quot;NULL&quot;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int count(NODE *node)&lt;br /&gt;{&lt;br /&gt;    node=&amp;amp;start;&lt;br /&gt;  int c=0;&lt;br /&gt;  while(node-&amp;gt;next!=NULL)&lt;br /&gt;  {&lt;br /&gt;        c++;&lt;br /&gt;        node=node-&amp;gt;next;&lt;br /&gt;  }&lt;br /&gt;  return (c);&lt;br /&gt;}&lt;br /&gt;NODE *insert(NODE *node,int key)&lt;br /&gt;{&lt;br /&gt;        node=&amp;amp;start;&lt;br /&gt;        NODE *newnode,*n1;&lt;br /&gt;        NODE *temp=node;&lt;br /&gt;        if(node-&amp;gt;info==key)&lt;br /&gt;        {&lt;br /&gt;          newnode=(NODE *)malloc(sizeof(NODE));&lt;br /&gt;          printf(&quot;\n enter a number to add-&amp;gt;&quot;);&lt;br /&gt;          scanf(&quot;%d&quot;,&amp;amp;newnode-&amp;gt;info);&lt;br /&gt;          newnode-&amp;gt;next=node;&lt;br /&gt;          node=newnode;&lt;br /&gt;          return(node);&lt;br /&gt;        }&lt;br /&gt;      else&lt;br /&gt;        {&lt;br /&gt;          n1=search(node,key);&lt;br /&gt;          if(n1==NULL)&lt;br /&gt;             {&lt;br /&gt;              printf(&quot;\n searching node not found&quot;);&lt;br /&gt;              exit(0);&lt;br /&gt;             }&lt;br /&gt;&lt;br /&gt;              newnode=(NODE*)malloc(sizeof(NODE));&lt;br /&gt;              printf(&quot;\n enter a number to add-&amp;gt;&quot;);&lt;br /&gt;              scanf(&quot;%d&quot;,&amp;amp;newnode-&amp;gt;info);&lt;br /&gt;              newnode-&amp;gt;next=n1-&amp;gt;next;&lt;br /&gt;              n1-&amp;gt;next=newnode;&lt;br /&gt;              return(temp);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;NODE *search(NODE *node,int key)&lt;br /&gt;{&lt;br /&gt;     node=&amp;amp;start;&lt;br /&gt;     while(node!=NULL)&lt;br /&gt;     {&lt;br /&gt;        if(node-&amp;gt;info==key)&lt;br /&gt;        {&lt;br /&gt;          return(node);&lt;br /&gt;        }&lt;br /&gt;        node=node-&amp;gt;next;&lt;br /&gt;     }&lt;br /&gt;     return(NULL);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void main()&lt;br /&gt;  {&lt;br /&gt;&lt;br /&gt;     NODE *head;&lt;br /&gt;     int key;&lt;br /&gt;     head=create(head);&lt;br /&gt;     printf(&quot;\n after creation linked list is---&amp;gt;\n&quot;);&lt;br /&gt;     display(head);&lt;br /&gt;     printf(&quot;\n total number of nodes=%d&quot;,count(head));&lt;br /&gt;     printf(&quot;\n enter a searching number where new node will be inserted--&amp;gt;&quot;);&lt;br /&gt;     scanf(&quot;%d&quot;,&amp;amp;key);&lt;br /&gt;     head=insert(head,key);&lt;br /&gt;     printf(&quot;\n after insertion list is=\n&quot;);&lt;br /&gt;     display(head);&lt;br /&gt;     getch();&lt;br /&gt;  }&lt;br /&gt;&lt;/malloc.h&gt;&lt;/stdlib.h&gt;&lt;/conio.h&gt;&lt;/stdio.h&gt;</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/2876762497743932937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2011/04/to-create-single-linked-listdisplay.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/2876762497743932937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/2876762497743932937'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2011/04/to-create-single-linked-listdisplay.html' title='To create single linked list,display it,count total no. of nodes in list and add node at any specific position....'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03851966622960643137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-7800586091352306279</id><published>2011-03-22T06:43:00.001-07:00</published><updated>2011-03-22T06:43:31.286-07:00</updated><title type='text'>Constructors in Derived Class</title><content type='html'>A constructor plays a vital role in initializing an object. An important note, while using constructors during inheritance, is that, as long as a base class constructor does not take any arguments, the derived class need not have a constructor function. However, if a base class contains a constructor with one or more arguments, then it is mandatory for the derived class to have a constructor and pass the arguments to the base class constructor. Remember, while applying inheritance, we usually create objects using derived class. Thus, it makes sense for the derived class to pass arguments to the base class constructor. When both the derived and base class contains constructors, the base constructor is executed first and then the constructor in the derived class is executed.&lt;br /&gt;&lt;br /&gt;In case of multiple inheritance, the base class is constructed in the same order in which they appear in the declaration of the derived class. Similarly, in a multilevel inheritance, the constructor will be executed in the order of inheritance.&lt;br /&gt;&lt;br /&gt;The derived class takes the responsibility of supplying the initial values to its base class. The constructor of the derived class receives the entire list of required values as its argument and passes them on to the base constructor in the order in which they are declared in the derived class. A base class constructor is called and executed before executing the statements in the body of the derived class.&lt;br /&gt;&lt;br /&gt;The header line of the derived-constructor function contains two parts separated by a colon (:). The first part provides the declaration of the arguments that are passed to the derived class constructor and the second part lists the function calls to the base class.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A(a1, a2) invokes the base constructor A() and B(b1, b2) invokes another base class constructor B(). The constructor D() supply the values i.e. a1, a2, b1, b2 (to A() and B()) and to one of its own variables d1.&lt;br /&gt;&lt;br /&gt;Hence, the assignment of the values will be as follows:&lt;br /&gt;&lt;br /&gt;When an object of D is created, D object-name(5, 12, 7, 8, 30);&lt;br /&gt;&lt;br /&gt;a1 &lt;- 5 a2 &lt;- 12 b1 &lt;- 7 b2 &lt;- 8 d1 &lt;- 30&lt;br /&gt;&lt;br /&gt;The constructors for a virtual base class are invoked before any non-virtual base classes. If there are multiple virtual base classes, then they are invoked in the order in which they are declared.</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/7800586091352306279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2011/03/constructors-in-derived-class.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/7800586091352306279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/7800586091352306279'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2011/03/constructors-in-derived-class.html' title='Constructors in Derived Class'/><author><name>Aashik Manandhar</name><uri>http://www.blogger.com/profile/01226574202899596000</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi44brsgzR09u-RZYYsKqcIQziqJC1uhb-6W665JpcZ-ukUrRr-aDztvEeQVKkve_DPghpoFWGg9_mI3mYG8XvOv3k91TrRQhYckIWbvR0-IHElPHfMgpgJjy-wwxigiEw/s220/8.1822.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-6539081652126395903</id><published>2011-03-21T10:41:00.000-07:00</published><updated>2011-03-21T23:50:03.114-07:00</updated><title type='text'></title><content type='html'>&lt;span style=&quot;font-weight:bold;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;TYPES OF DERIVATION IN INHERITANCE USING C++&lt;/span&gt;&lt;br /&gt;&lt;img src=&quot;http://cellloaded.files.wordpress.com/2011/03/derivation1.jpg&quot; width=&quot;660px&quot; height=&quot;400px&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/6539081652126395903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2011/03/types-of-derivation-in-inheritance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/6539081652126395903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/6539081652126395903'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2011/03/types-of-derivation-in-inheritance.html' title=''/><author><name>Aashik Manandhar</name><uri>http://www.blogger.com/profile/01226574202899596000</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi44brsgzR09u-RZYYsKqcIQziqJC1uhb-6W665JpcZ-ukUrRr-aDztvEeQVKkve_DPghpoFWGg9_mI3mYG8XvOv3k91TrRQhYckIWbvR0-IHElPHfMgpgJjy-wwxigiEw/s220/8.1822.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-1177503903331656575</id><published>2011-03-17T05:15:00.001-07:00</published><updated>2011-03-17T05:15:48.114-07:00</updated><title type='text'></title><content type='html'>hi every one which follow dis link</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/1177503903331656575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2011/03/hi-every-one-which-follow-dis-link.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/1177503903331656575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/1177503903331656575'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2011/03/hi-every-one-which-follow-dis-link.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03851966622960643137</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-5883035758084534863</id><published>2011-03-12T08:58:00.001-08:00</published><updated>2011-03-12T09:00:48.137-08:00</updated><title type='text'>Write a function DeleteList() that takes a list, deallocates all of its memory and sets its head pointer to NULL (the empty list).</title><content type='html'>void DeleteList(struct node** headRef) &lt;br /&gt;{&lt;br /&gt;     struct node* current = *headRef; // deref headRef to get the real head&lt;br /&gt;     struct node* next;&lt;br /&gt;           while (current != NULL) &lt;br /&gt;                {&lt;br /&gt;                next = current-&gt;next; // note the next pointer&lt;br /&gt;                free(current); // delete the node&lt;br /&gt;                current = next; // advance to the next node&lt;br /&gt;                }&lt;br /&gt;*headRef = NULL; // Again, deref headRef to affect the real head back&lt;br /&gt;// in the caller.&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/5883035758084534863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2011/03/write-function-deletelist-that-takes.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/5883035758084534863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/5883035758084534863'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2011/03/write-function-deletelist-that-takes.html' title='Write a function DeleteList() that takes a list, deallocates all of its memory and sets its head pointer to NULL (the empty list).'/><author><name>Aashik Manandhar</name><uri>http://www.blogger.com/profile/01226574202899596000</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi44brsgzR09u-RZYYsKqcIQziqJC1uhb-6W665JpcZ-ukUrRr-aDztvEeQVKkve_DPghpoFWGg9_mI3mYG8XvOv3k91TrRQhYckIWbvR0-IHElPHfMgpgJjy-wwxigiEw/s220/8.1822.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-26015580150779984</id><published>2011-03-12T08:55:00.000-08:00</published><updated>2011-03-12T08:56:11.918-08:00</updated><title type='text'>Write a Count() function that counts the number of times a given int occurs in a linklist.</title><content type='html'>int Count(struct node* head, int searchFor) {&lt;br /&gt;struct node* current = head;&lt;br /&gt;int count = 0;&lt;br /&gt;while (current != NULL) {&lt;br /&gt;if (current-&gt;data == searchFor) count++;&lt;br /&gt;current = current-&gt;next;&lt;br /&gt;{&lt;br /&gt;return count;&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/26015580150779984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2011/03/write-count-function-that-counts-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/26015580150779984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/26015580150779984'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2011/03/write-count-function-that-counts-number.html' title='Write a Count() function that counts the number of times a given int occurs in a linklist.'/><author><name>Aashik Manandhar</name><uri>http://www.blogger.com/profile/01226574202899596000</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi44brsgzR09u-RZYYsKqcIQziqJC1uhb-6W665JpcZ-ukUrRr-aDztvEeQVKkve_DPghpoFWGg9_mI3mYG8XvOv3k91TrRQhYckIWbvR0-IHElPHfMgpgJjy-wwxigiEw/s220/8.1822.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-219322419654552302</id><published>2011-02-28T18:48:00.000-08:00</published><updated>2011-02-28T18:51:06.571-08:00</updated><title type='text'>program to display number of nodes in linked list data structure using c language</title><content type='html'>&lt;pre&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;#include&lt;alloc.h&gt;&lt;br /&gt;struct linkedlist&lt;br /&gt;{&lt;br /&gt; int data;&lt;br /&gt; struct linkedlist *next;&lt;br /&gt;};&lt;br /&gt;typedef struct linkedlist node;&lt;br /&gt;         void main()&lt;br /&gt;         {&lt;br /&gt;         int count=0;&lt;br /&gt;         node *head,*ptr,*new1;&lt;br /&gt;         char ch;&lt;br /&gt;         clrscr();&lt;br /&gt;         head=(node *)malloc(sizeof(node));&lt;br /&gt;         ptr=head;&lt;br /&gt;  do&lt;br /&gt;  {&lt;br /&gt;  printf(&quot;\nEnter the data\n&quot;);&lt;br /&gt;  scanf(&quot;%d&quot;,&amp;ptr-&gt;data);&lt;br /&gt;  count++;&lt;br /&gt;  printf(&quot;Do you want to continue(y/n):&quot;);&lt;br /&gt;  ch=getch();&lt;br /&gt;     if(ch==&#39;y&#39;)&lt;br /&gt;     {&lt;br /&gt;     clrscr();&lt;br /&gt;     ptr-&gt;next=(node *)malloc(sizeof(node));&lt;br /&gt;     ptr-&gt;next=new1;&lt;br /&gt;     ptr=ptr-&gt;next;&lt;br /&gt;     }&lt;br /&gt;          else&lt;br /&gt;          ptr-&gt;next=NULL;&lt;br /&gt;  }&lt;br /&gt; while(ch!=&#39;n&#39;);&lt;br /&gt;&lt;br /&gt; printf(&quot;\nno of nodes inthe list %d&quot;,count);&lt;br /&gt; getch(); &lt;br /&gt; }&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/219322419654552302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2011/02/program-to-display-number-of-nodes-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/219322419654552302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/219322419654552302'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2011/02/program-to-display-number-of-nodes-in.html' title='program to display number of nodes in linked list data structure using c language'/><author><name>Aashik Manandhar</name><uri>http://www.blogger.com/profile/01226574202899596000</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi44brsgzR09u-RZYYsKqcIQziqJC1uhb-6W665JpcZ-ukUrRr-aDztvEeQVKkve_DPghpoFWGg9_mI3mYG8XvOv3k91TrRQhYckIWbvR0-IHElPHfMgpgJjy-wwxigiEw/s220/8.1822.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-2678053434239989664</id><published>2011-02-28T18:40:00.001-08:00</published><updated>2011-02-28T18:47:45.052-08:00</updated><title type='text'>Program to display largest number in Linklist</title><content type='html'>&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;alloc.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;struct linkedlist&lt;br /&gt;{&lt;br /&gt;int data;&lt;br /&gt;struct linkedlist *next;&lt;br /&gt;};&lt;br /&gt;typedef struct linkedlist node;&lt;br /&gt;    void main()&lt;br /&gt;    {&lt;br /&gt;    node *head,*ptr,*new1;&lt;br /&gt;    char ch;&lt;br /&gt;    int large;&lt;br /&gt;    clrscr();&lt;br /&gt;    head=(node *)malloc(sizeof(node));&lt;br /&gt;    ptr=head;&lt;br /&gt;            do&lt;br /&gt;            {&lt;br /&gt;            printf(&quot;\nEnter the data \n&quot;);&lt;br /&gt;            scanf(&quot;%d&quot;,&amp;ptr-&gt;data);&lt;br /&gt;            printf(&quot;\nDo you want to continue(y/n):&quot;);&lt;br /&gt;            ch=getch();&lt;br /&gt;                if(ch==&#39;y&#39;)&lt;br /&gt;                  {&lt;br /&gt;                  clrscr();&lt;br /&gt;                   ptr-&gt;next=(node *)malloc(sizeof(node));&lt;br /&gt;                   ptr-&gt;next=new1;&lt;br /&gt;                   ptr=ptr-&gt;next;&lt;br /&gt;                   }&lt;br /&gt;                       else&lt;br /&gt;                       ptr-&gt;next=NULL;&lt;br /&gt;       }&lt;br /&gt;  while(ch!=&#39;n&#39;);&lt;br /&gt;  ptr=head;&lt;br /&gt;  large=ptr-&gt;data;&lt;br /&gt;  // printf(&quot;\nLinklist elements are:\n&quot;);&lt;br /&gt;  while(ptr!=NULL)&lt;br /&gt;  {&lt;br /&gt;  ptr=ptr-&gt;next;&lt;br /&gt;  if(ptr-&gt;data&gt;large)&lt;br /&gt;  large=ptr-&gt;data;&lt;br /&gt;  }&lt;br /&gt;  printf(&quot;\nLargest Number in linked list= %d\t&quot;,large);&lt;br /&gt;  getch();&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/2678053434239989664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2011/02/program-to-display-largest-number-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/2678053434239989664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/2678053434239989664'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2011/02/program-to-display-largest-number-in.html' title='Program to display largest number in Linklist'/><author><name>Aashik Manandhar</name><uri>http://www.blogger.com/profile/01226574202899596000</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi44brsgzR09u-RZYYsKqcIQziqJC1uhb-6W665JpcZ-ukUrRr-aDztvEeQVKkve_DPghpoFWGg9_mI3mYG8XvOv3k91TrRQhYckIWbvR0-IHElPHfMgpgJjy-wwxigiEw/s220/8.1822.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-3389435541991028731</id><published>2011-02-28T18:26:00.000-08:00</published><updated>2011-02-28T18:27:53.001-08:00</updated><title type='text'>A simple ATM transaction program in c language.</title><content type='html'>&lt;div&gt;#include&lt;stdio.h&gt;&lt;/div&gt;&lt;div&gt;#include&lt;conio.h&gt;&lt;/div&gt;&lt;div&gt;char x;&lt;/div&gt;&lt;div&gt;int pin, repeat, menu;&lt;/div&gt;&lt;div&gt;int withdraw, deposit, transfer, amount;&lt;/div&gt;&lt;div&gt;main()&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;{ clrscr();&lt;/div&gt;&lt;div&gt;gotoxy(20,1);printf(&quot;:--------------------------------------:\n&quot;);&lt;/div&gt;&lt;div&gt;gotoxy(20,2);printf(&quot;: Welcome to ATM Banking System:\n&quot;);&lt;/div&gt;&lt;div&gt;gotoxy(20,3);printf(&quot;: Created by:\n&quot;);&lt;/div&gt;&lt;div&gt;gotoxy(20,4);printf(&quot;: ivan john Navasca:\n&quot;);&lt;/div&gt;&lt;div&gt;gotoxy(20,5);printf(&quot;: :\n&quot;);&lt;/div&gt;&lt;div&gt;gotoxy(20,6);printf(&quot;: Enter your PIN --&gt;:\n&quot;);&lt;/div&gt;&lt;div&gt;gotoxy(20,7);printf(&quot;:--------------------------------------:\n&quot;);&lt;/div&gt;&lt;div&gt;gotoxy(40,6);&lt;/div&gt;&lt;div&gt;scanf(&quot; %d&quot;,&amp;amp;pin);&lt;/div&gt;&lt;div&gt;    if (pin==1234)&lt;/div&gt;&lt;div&gt;    {printf(&quot;access granted&quot;);}&lt;/div&gt;&lt;div&gt;    else&lt;/div&gt;&lt;div&gt;    {exit();}&lt;/div&gt;&lt;div&gt;Loop:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;{clrscr();&lt;/div&gt;&lt;div&gt;printf(&quot;:-------------------------------------------:\n&quot;);&lt;/div&gt;&lt;div&gt;printf(&quot;: Choose your Transaction :\n&quot;);&lt;/div&gt;&lt;div&gt;printf(&quot;::\n&quot;);&lt;/div&gt;&lt;div&gt;printf(&quot;: 1 Inquiry Balance :\n&quot;);&lt;/div&gt;&lt;div&gt;printf(&quot;: 2 Withdraw:\n&quot;);&lt;/div&gt;&lt;div&gt;printf(&quot;: 3 Deposit :\n&quot;);&lt;/div&gt;&lt;div&gt;printf(&quot;: 4 Transfer Fund:\n&quot;);&lt;/div&gt;&lt;div&gt;printf(&quot;: 5 Exit:\n&quot;);&lt;/div&gt;&lt;div&gt;printf(&quot;: --&gt;:\n&quot;);&lt;/div&gt;&lt;div&gt;printf(&quot;:-------------------------------------------:\n&quot;);&lt;/div&gt;&lt;div&gt;gotoxy(6,9);&lt;/div&gt;&lt;div&gt;scanf(&quot; %d&quot;,&amp;amp;menu);&lt;/div&gt;&lt;div&gt;printf(&quot;\n\n&quot;);&lt;/div&gt;&lt;div&gt;switch(menu)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    {&lt;/div&gt;&lt;div&gt;    case 1:{printf(&quot;Your balance %d\n\n&quot;,amount);&lt;/div&gt;&lt;div&gt;        printf(&quot;Another transaction? y or n?: &quot;);&lt;/div&gt;&lt;div&gt;        scanf(&quot; %c&quot;,&amp;amp;x);&lt;/div&gt;&lt;div&gt;            if((x == &#39;y&#39;)||(x== &#39;Y&#39;))&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                goto Loop;&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;            else if((x ==&#39;n&#39;)||(x== &#39;N&#39;))&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                printf(&quot;\nThank You for Banking&quot;);&lt;/div&gt;&lt;div&gt;                getch();&lt;/div&gt;&lt;div&gt;                exit();&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;    break;}&lt;/div&gt;&lt;div&gt;    case 2:{if(amount==0)&lt;/div&gt;&lt;div&gt;        {printf(&quot;You have an Isuficient Fund\nPress Enter&quot;);&lt;/div&gt;&lt;div&gt;         getch();&lt;/div&gt;&lt;div&gt;         goto Loop;&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;        else&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        {&lt;/div&gt;&lt;div&gt;        printf(&quot;Your Balance %d\n\n&quot;,amount);&lt;/div&gt;&lt;div&gt;        printf(&quot;Enter Amount to Withdraw: &quot;);&lt;/div&gt;&lt;div&gt;        scanf(&quot;%d&quot;,&amp;amp;withdraw);&lt;/div&gt;&lt;div&gt;        amount = amount - withdraw;&lt;/div&gt;&lt;div&gt;        printf(&quot;\nYour Current Balance %d\n\n&quot;,amount);&lt;/div&gt;&lt;div&gt;        printf(&quot;Another Transaction? y or n : &quot;);&lt;/div&gt;&lt;div&gt;        scanf(&quot; %c&quot;,&amp;amp;x);&lt;/div&gt;&lt;div&gt;            if((x ==&#39;y&#39;)||(x==&#39;Y&#39;))&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                goto Loop;&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;            else if ((x ==&#39;n&#39;)||(x==&#39;N&#39;))&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                printf(&quot;\nThank You for Banking&quot;);&lt;/div&gt;&lt;div&gt;                getch();&lt;/div&gt;&lt;div&gt;                exit();&lt;/div&gt;&lt;div&gt;        }        }&lt;/div&gt;&lt;div&gt;    break;}&lt;/div&gt;&lt;div&gt;    case 3:{printf(&quot;Your Balance %d\n&quot;,amount);&lt;/div&gt;&lt;div&gt;        printf(&quot;\nEnter Amount to Deposit: &quot;);&lt;/div&gt;&lt;div&gt;        scanf(&quot;%d&quot;,&amp;amp;deposit);&lt;/div&gt;&lt;div&gt;        amount= amount + deposit;&lt;/div&gt;&lt;div&gt;        printf(&quot;\nYour Current Balance %d\n&quot;,amount);&lt;/div&gt;&lt;div&gt;        printf(&quot;Another Transaction? y or n: &quot;);&lt;/div&gt;&lt;div&gt;        scanf(&quot; %c&quot;,&amp;amp;x);&lt;/div&gt;&lt;div&gt;            if ((x ==&#39;y&#39;)||(x==&#39;Y&#39;))&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                goto Loop;&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;            else if ((x ==&#39;n&#39;)||(x==&#39;N&#39;))&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                printf(&quot;\n\nThank You for Banking&quot;);&lt;/div&gt;&lt;div&gt;                getch();&lt;/div&gt;&lt;div&gt;                exit();&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;        break;}&lt;/div&gt;&lt;div&gt;    case 4:{printf(&quot;Your Balance %d\n&quot;,amount);&lt;/div&gt;&lt;div&gt;        printf(&quot;\nEnter Amount to Transfer: &quot;);&lt;/div&gt;&lt;div&gt;        scanf(&quot; %d&quot;,&amp;amp;transfer);&lt;/div&gt;&lt;div&gt;        amount = amount - transfer;&lt;/div&gt;&lt;div&gt;        printf(&quot;\nYour Current Balance %d&quot;,amount);&lt;/div&gt;&lt;div&gt;        printf(&quot;\n\nAnother Transaction? y or n: &quot;);&lt;/div&gt;&lt;div&gt;        scanf(&quot; %c&quot;,&amp;amp;x);&lt;/div&gt;&lt;div&gt;            if ((x ==&#39;y&#39;)||(x==&#39;Y&#39;))&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                goto Loop;&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;            else if ((x ==&#39;n&#39;)||(x==&#39;N&#39;))&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                printf(&quot;Thank You for Banking&quot;);&lt;/div&gt;&lt;div&gt;                getch();&lt;/div&gt;&lt;div&gt;                exit();&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;    break;}&lt;/div&gt;&lt;div&gt;    case 5:{printf(&quot;You Want to Exit? y or n: &quot;);&lt;/div&gt;&lt;div&gt;        scanf(&quot; %c&quot;,&amp;amp;x);&lt;/div&gt;&lt;div&gt;            if ((x==&#39;y&#39;)||(x==&#39;Y&#39;))&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                printf(&quot;\n\nThank You &amp;amp; Come Again&quot;);&lt;/div&gt;&lt;div&gt;                getch();&lt;/div&gt;&lt;div&gt;                exit();&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;            else if ((x ==&#39;n&#39;)||(x==&#39;N&#39;))&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                 goto Loop;&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;    break;}&lt;/div&gt;&lt;div&gt;    default:&lt;/div&gt;&lt;div&gt;    exit();&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;while(repeat);&lt;/div&gt;&lt;div&gt;getch();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/3389435541991028731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2011/02/simple-atm-transaction-program-in-c.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/3389435541991028731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/3389435541991028731'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2011/02/simple-atm-transaction-program-in-c.html' title='A simple ATM transaction program in c language.'/><author><name>Aashik Manandhar</name><uri>http://www.blogger.com/profile/01226574202899596000</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi44brsgzR09u-RZYYsKqcIQziqJC1uhb-6W665JpcZ-ukUrRr-aDztvEeQVKkve_DPghpoFWGg9_mI3mYG8XvOv3k91TrRQhYckIWbvR0-IHElPHfMgpgJjy-wwxigiEw/s220/8.1822.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-2285807328883118967</id><published>2011-02-23T10:11:00.000-08:00</published><updated>2011-02-23T10:12:26.830-08:00</updated><title type='text'>If four-digit number is input through the keyboard, write a program to obtain the sum of the first and the last digit of this number.</title><content type='html'>#include&lt;stdio.h&gt;  &lt;br /&gt;  &lt;br /&gt;main ()  &lt;br /&gt;{  &lt;br /&gt;int number, last_digit, first_digit, total;  &lt;br /&gt;printf (&quot;Enter the number which is to be Work out: &quot;);  &lt;br /&gt;  &lt;br /&gt;scanf (&quot;%d&quot;, &amp;number);  &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;last_digit = number % 10;  &lt;br /&gt;  &lt;br /&gt;total = last_digit;  &lt;br /&gt;  &lt;br /&gt;first_digit = (number / 1000) % 10;  &lt;br /&gt;  &lt;br /&gt;total = total + first_digit;  &lt;br /&gt;  &lt;br /&gt;printf (&quot;The total of the first and the last digit of the entered number is: %d&quot;, total);  &lt;br /&gt;  &lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/2285807328883118967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2011/02/if-four-digit-number-is-input-through.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/2285807328883118967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/2285807328883118967'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2011/02/if-four-digit-number-is-input-through.html' title='If four-digit number is input through the keyboard, write a program to obtain the sum of the first and the last digit of this number.'/><author><name>Aashik Manandhar</name><uri>http://www.blogger.com/profile/01226574202899596000</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi44brsgzR09u-RZYYsKqcIQziqJC1uhb-6W665JpcZ-ukUrRr-aDztvEeQVKkve_DPghpoFWGg9_mI3mYG8XvOv3k91TrRQhYckIWbvR0-IHElPHfMgpgJjy-wwxigiEw/s220/8.1822.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-1339804751666691173</id><published>2010-10-27T06:18:00.001-07:00</published><updated>2011-02-23T10:05:05.593-08:00</updated><title type='text'>Program to print all the ASCII values characters using a while loop. The ASCII values from 0 to 255.</title><content type='html'>#include&lt;stdio.h&gt;&lt;stdio.h&gt;&lt;br /&gt;main() &lt;br /&gt;{ &lt;br /&gt;int num; &lt;br /&gt;printf(&quot;Printing ASCII values Table...\n\n&quot;); &lt;br /&gt;num = 1; &lt;br /&gt;while(num&lt;=255) &lt;br /&gt;{ &lt;br /&gt;printf(&quot;\nValue:%d = ASCII Character:%c&quot;, num, num);  &lt;br /&gt;&lt;br /&gt;/*This change has been made as per the comment. Thank you anonymous Blog Viewer ... */ &lt;br /&gt;num++; &lt;br /&gt;} &lt;br /&gt;printf(&quot;\n\nEND\n&quot;); &lt;br /&gt;} &lt;br /&gt; &lt;/stdio.h&gt;</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/1339804751666691173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2010/10/ahkhfk-askjdhfkj-ashfk-sdkjhjkasdh-jka.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/1339804751666691173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/1339804751666691173'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2010/10/ahkhfk-askjdhfkj-ashfk-sdkjhjkasdh-jka.html' title='Program to print all the ASCII values characters using a while loop. The ASCII values from 0 to 255.'/><author><name>Aashik Manandhar</name><uri>http://www.blogger.com/profile/01226574202899596000</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi44brsgzR09u-RZYYsKqcIQziqJC1uhb-6W665JpcZ-ukUrRr-aDztvEeQVKkve_DPghpoFWGg9_mI3mYG8XvOv3k91TrRQhYckIWbvR0-IHElPHfMgpgJjy-wwxigiEw/s220/8.1822.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7111685733904506984.post-8633778136168775067</id><published>2010-10-27T06:12:00.000-07:00</published><updated>2011-02-23T10:15:12.831-08:00</updated><title type='text'>Implement Singly-linked List in C</title><content type='html'>#include &lt;stdio.h&gt;&lt;br /&gt;#include &lt;stdlib.h&gt;&lt;br /&gt;&lt;br /&gt;struct node{&lt;br /&gt; int data;&lt;br /&gt; struct node *next;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;struct node* add(struct node *head, int data){&lt;br /&gt; struct node *tmp;&lt;br /&gt;&lt;br /&gt; if(head == NULL){&lt;br /&gt;  head=(struct node *)malloc(sizeof(struct node));&lt;br /&gt;  if(head == NULL){&lt;br /&gt;   printf(&quot;Error! memory is not available\n&quot;);&lt;br /&gt;   exit(0);&lt;br /&gt;  }&lt;br /&gt;  head-&gt; data = data;&lt;br /&gt;  head-&gt; next = head; &lt;br /&gt; }else{&lt;br /&gt;  tmp = head;&lt;br /&gt;  &lt;br /&gt;  while (tmp-&gt; next != head)&lt;br /&gt;   tmp = tmp-&gt; next;&lt;br /&gt;  tmp-&gt; next = (struct node *)malloc(sizeof(struct node)); &lt;br /&gt;  if(tmp -&gt; next == NULL)&lt;br /&gt;  {&lt;br /&gt;   printf(&quot;Error! memory is not available\n&quot;);&lt;br /&gt;   exit(0);&lt;br /&gt;  }&lt;br /&gt;  tmp = tmp-&gt; next;&lt;br /&gt;  tmp-&gt; data = data;&lt;br /&gt;  tmp-&gt; next = head;&lt;br /&gt; }&lt;br /&gt; return head;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void printlist(struct node *head)&lt;br /&gt;{&lt;br /&gt; struct node *current;&lt;br /&gt; current = head;&lt;br /&gt; if(current!= NULL)&lt;br /&gt; {&lt;br /&gt;  do&lt;br /&gt;  {&lt;br /&gt;   printf(&quot;%d\t&quot;,current-&gt;data);&lt;br /&gt;   current = current-&gt;next;&lt;br /&gt;  } while (current!= head);&lt;br /&gt;  printf(&quot;\n&quot;);&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt;  printf(&quot;The list is empty\n&quot;);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void destroy(struct node *head) &lt;br /&gt;{&lt;br /&gt; struct node *current, *tmp;&lt;br /&gt; &lt;br /&gt; current = head-&gt;next;&lt;br /&gt; head-&gt;next = NULL;&lt;br /&gt; while(current != NULL) {&lt;br /&gt;  tmp = current-&gt;next;&lt;br /&gt;  free(current);&lt;br /&gt;  current = tmp;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt; struct node *head = NULL;&lt;br /&gt; head = add(head,1); /* 1 */&lt;br /&gt; printlist(head);&lt;br /&gt;&lt;br /&gt; head = add(head,20);/* 20 */&lt;br /&gt; printlist(head);&lt;br /&gt;&lt;br /&gt; head = add(head,10);/* 1 20 10 */&lt;br /&gt; printlist(head);&lt;br /&gt;&lt;br /&gt; head = add(head,5); /* 1 20 10 5*/&lt;br /&gt; printlist(head);&lt;br /&gt; &lt;br /&gt; destroy(head);&lt;br /&gt; getchar();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;</content><link rel='replies' type='application/atom+xml' href='http://thaheermca14.blogspot.com/feeds/8633778136168775067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thaheermca14.blogspot.com/2010/10/thaheers-precption.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/8633778136168775067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7111685733904506984/posts/default/8633778136168775067'/><link rel='alternate' type='text/html' href='http://thaheermca14.blogspot.com/2010/10/thaheers-precption.html' title='Implement Singly-linked List in C'/><author><name>Aashik Manandhar</name><uri>http://www.blogger.com/profile/01226574202899596000</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi44brsgzR09u-RZYYsKqcIQziqJC1uhb-6W665JpcZ-ukUrRr-aDztvEeQVKkve_DPghpoFWGg9_mI3mYG8XvOv3k91TrRQhYckIWbvR0-IHElPHfMgpgJjy-wwxigiEw/s220/8.1822.jpg'/></author><thr:total>0</thr:total></entry></feed>