<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: C++ programs to implement the Stack ADT using a singly linked list	</title>
	<atom:link href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Thu, 30 Oct 2014 02:03:52 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>
		By: Akshay		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/comment-page-1/#comment-43436</link>

		<dc:creator><![CDATA[Akshay]]></dc:creator>
		<pubDate>Thu, 30 Oct 2014 02:03:52 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1011#comment-43436</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/comment-page-1/#comment-43435&quot;&gt;Akshay&lt;/a&gt;.

theres a problem with the code... unable to copy it... plz ignore the above code and try checking the code of pop function once again]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/comment-page-1/#comment-43435">Akshay</a>.</p>
<p>theres a problem with the code&#8230; unable to copy it&#8230; plz ignore the above code and try checking the code of pop function once again</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Akshay		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/comment-page-1/#comment-43435</link>

		<dc:creator><![CDATA[Akshay]]></dc:creator>
		<pubDate>Thu, 30 Oct 2014 02:02:49 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1011#comment-43435</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/comment-page-1/#comment-43434&quot;&gt;Akshay&lt;/a&gt;.

void pop()
					 {
						 node *temp;
						 temp=s;
						 if( tos == -1 )
						  {
							  cout &#060;p=NULL;
					  }
					  }]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/comment-page-1/#comment-43434">Akshay</a>.</p>
<p>void pop()<br />
					 {<br />
						 node *temp;<br />
						 temp=s;<br />
						 if( tos == -1 )<br />
						  {<br />
							  cout &lt;p=NULL;<br />
					  }<br />
					  }</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Akshay		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/comment-page-1/#comment-43434</link>

		<dc:creator><![CDATA[Akshay]]></dc:creator>
		<pubDate>Thu, 30 Oct 2014 02:01:39 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1011#comment-43434</guid>

					<description><![CDATA[there is a small mistake in the pop function... plz check it out.... once you push two elements into the stack.. pop one and the display.. it displays both the elements.... i think the while loop is unnecessary and &quot;temp-&#062;p=NULL&quot; shoul be included in the else statement its self

				  void pop()
					 {
						 node *temp;
						 temp=s;
						 if( tos == -1 )
						  {
							  cout &#060;p=NULL;
					  }
					  }]]></description>
			<content:encoded><![CDATA[<p>there is a small mistake in the pop function&#8230; plz check it out&#8230;. once you push two elements into the stack.. pop one and the display.. it displays both the elements&#8230;. i think the while loop is unnecessary and &#8220;temp-&gt;p=NULL&#8221; shoul be included in the else statement its self</p>
<p>				  void pop()<br />
					 {<br />
						 node *temp;<br />
						 temp=s;<br />
						 if( tos == -1 )<br />
						  {<br />
							  cout &lt;p=NULL;<br />
					  }<br />
					  }</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: swathi		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/comment-page-1/#comment-37570</link>

		<dc:creator><![CDATA[swathi]]></dc:creator>
		<pubDate>Wed, 15 Oct 2014 13:59:49 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1011#comment-37570</guid>

					<description><![CDATA[top of stack]]></description>
			<content:encoded><![CDATA[<p>top of stack</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Srikanth Atkapurapu		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/comment-page-1/#comment-34915</link>

		<dc:creator><![CDATA[Srikanth Atkapurapu]]></dc:creator>
		<pubDate>Fri, 10 Oct 2014 11:41:31 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1011#comment-34915</guid>

					<description><![CDATA[if u have any doubts contact this mail srikanthat9@gmail.com..i will explain all these things]]></description>
			<content:encoded><![CDATA[<p>if u have any doubts contact this mail <a href="mailto:srikanthat9@gmail.com">srikanthat9@gmail.com</a>..i will explain all these things</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Srikanth Atkapurapu		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/comment-page-1/#comment-34914</link>

		<dc:creator><![CDATA[Srikanth Atkapurapu]]></dc:creator>
		<pubDate>Fri, 10 Oct 2014 11:39:33 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1011#comment-34914</guid>

					<description><![CDATA[&quot;C++ programs to implement the Stack ADT using a singly linked list&quot; This program not contains any error..use dev c++ ide...if u use turbo c++ do some modifications...]]></description>
			<content:encoded><![CDATA[<p>&#8220;C++ programs to implement the Stack ADT using a singly linked list&#8221; This program not contains any error..use dev c++ ide&#8230;if u use turbo c++ do some modifications&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Srikanth Atkapurapu		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/comment-page-1/#comment-34911</link>

		<dc:creator><![CDATA[Srikanth Atkapurapu]]></dc:creator>
		<pubDate>Fri, 10 Oct 2014 11:37:28 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1011#comment-34911</guid>

					<description><![CDATA[Hai Friends..The above program don&#039;t have any errors..use dev c++ ide application not in turbo c++...its good program]]></description>
			<content:encoded><![CDATA[<p>Hai Friends..The above program don&#8217;t have any errors..use dev c++ ide application not in turbo c++&#8230;its good program</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Srikanth Atkapurapu		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/comment-page-1/#comment-34907</link>

		<dc:creator><![CDATA[Srikanth Atkapurapu]]></dc:creator>
		<pubDate>Fri, 10 Oct 2014 11:33:27 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1011#comment-34907</guid>

					<description><![CDATA[srikanthat9@gmail.com]]></description>
			<content:encoded><![CDATA[<p><a href="mailto:srikanthat9@gmail.com">srikanthat9@gmail.com</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Srikanth Atkapurapu		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/comment-page-1/#comment-34906</link>

		<dc:creator><![CDATA[Srikanth Atkapurapu]]></dc:creator>
		<pubDate>Fri, 10 Oct 2014 11:30:01 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1011#comment-34906</guid>

					<description><![CDATA[/****** Program to Implement Stack using Linked List ******/
/*
 * Student database by using Single linked list
 */
#include 
#include 
#include 
#include 
using namespace std;

struct node
{
  int id, marks;
  char grade, name[20], course[15];
  struct node *next;
}  *headnode = NULL,  *tempnode,  *startnode;
class student
{
  public:
    void add();
    void pop();
    void display();
};
void student::add()
{
  system(&quot;cls&quot;);
  int id, marks, totalmarks, m1, m2, m3, m4, m5, m6;
  tempnode = new node;
  if (headnode == NULL)
  {
    cout &#060;&#062; tempnode-&#062;id;
    cout &#060;&#062; tempnode-&#062;name;
    cout &#060;&#062; tempnode-&#062;course;
    tempnode-&#062;next = NULL;
    headnode = tempnode;
  }
  else
  {
    cout &#060;&#062; tempnode-&#062;id;
    cout &#060;&#062; tempnode-&#062;name;
    cout &#060;&#062; tempnode-&#062;course;
    tempnode-&#062;next = headnode;
    headnode = tempnode;
  }
}

void student::display()
{
  system(&quot;cls&quot;);
  int item;
  struct node *ptr = headnode;
  int i = 1;
  if (ptr == NULL)
    cout &#060;&#060; &#034;\n list is empty.\n&#034;;
  else
  {
    cout &#060;&#060; &#034;\n id\tname\tcourse\tGrade \n\n&#034;;
    while (ptr != NULL)
    {
      cout &#060;&#060; &#034; &#034; &#060;id &#060;&#060; &#034;  &#034; &#060;name &#060;&#060; &#034;   &#034;;
      cout &#060;course &#060;&#060; &#034;  &#034; &#060;grade &#060;next;
      i++;
    } 
  }
  //system(&quot;pause&quot;);
}

void student::pop()
{
  int item;
  struct node *ptr;
  if (headnode == NULL)
    cout &#060;id;
    headnode = headnode-&#062;next;
    free(ptr);

    cout &#060;&#060; &#034;\n\n Item deleted:&#034;;
  } 
}
int main()
{
  student sd;
  system(&#034;cls&#034;);
  int ch = 0;
  //char ni[5];
  while (ch != 7)
  {
    cout &#060;&#060; &#034;\n \t\t************STUDENT DATABASE************&#034;;
    cout &#060;&#060; &#034;\n \t\t----------------------------------------&#034;;
    cout &#060;&#060; &#034;\n\n \t\t\t 1.Push the Student Record  \n\n \t\t\t 2.Pop Record&#034;;
    cout &#060;&#060; &#034;\n\n \t\t\t 3.Display Records \n\n \t\t\t 0.Exit This Menu&#034;;
    cout &#060;&#062; ch;
    switch (ch)
    {
      case 1:
        sd.add();
        break;
      case 2:
        sd.pop();
        break;
      case 3:
        sd.display();
        break;
      case 0:
        exit(0);
    }
  }
  getch();
  return 0;
}]]></description>
			<content:encoded><![CDATA[<p>/****** Program to Implement Stack using Linked List ******/<br />
/*<br />
 * Student database by using Single linked list<br />
 */<br />
#include<br />
#include<br />
#include<br />
#include<br />
using namespace std;</p>
<p>struct node<br />
{<br />
  int id, marks;<br />
  char grade, name[20], course[15];<br />
  struct node *next;<br />
}  *headnode = NULL,  *tempnode,  *startnode;<br />
class student<br />
{<br />
  public:<br />
    void add();<br />
    void pop();<br />
    void display();<br />
};<br />
void student::add()<br />
{<br />
  system(&#8220;cls&#8221;);<br />
  int id, marks, totalmarks, m1, m2, m3, m4, m5, m6;<br />
  tempnode = new node;<br />
  if (headnode == NULL)<br />
  {<br />
    cout &lt;&gt; tempnode-&gt;id;<br />
    cout &lt;&gt; tempnode-&gt;name;<br />
    cout &lt;&gt; tempnode-&gt;course;<br />
    tempnode-&gt;next = NULL;<br />
    headnode = tempnode;<br />
  }<br />
  else<br />
  {<br />
    cout &lt;&gt; tempnode-&gt;id;<br />
    cout &lt;&gt; tempnode-&gt;name;<br />
    cout &lt;&gt; tempnode-&gt;course;<br />
    tempnode-&gt;next = headnode;<br />
    headnode = tempnode;<br />
  }<br />
}</p>
<p>void student::display()<br />
{<br />
  system(&#8220;cls&#8221;);<br />
  int item;<br />
  struct node *ptr = headnode;<br />
  int i = 1;<br />
  if (ptr == NULL)<br />
    cout &lt;&lt; &quot;\n list is empty.\n&quot;;<br />
  else<br />
  {<br />
    cout &lt;&lt; &quot;\n id\tname\tcourse\tGrade \n\n&quot;;<br />
    while (ptr != NULL)<br />
    {<br />
      cout &lt;&lt; &quot; &quot; &lt;id &lt;&lt; &quot;  &quot; &lt;name &lt;&lt; &quot;   &quot;;<br />
      cout &lt;course &lt;&lt; &quot;  &quot; &lt;grade &lt;next;<br />
      i++;<br />
    }<br />
  }<br />
  //system(&#8220;pause&#8221;);<br />
}</p>
<p>void student::pop()<br />
{<br />
  int item;<br />
  struct node *ptr;<br />
  if (headnode == NULL)<br />
    cout &lt;id;<br />
    headnode = headnode-&gt;next;<br />
    free(ptr);</p>
<p>    cout &lt;&lt; &quot;\n\n Item deleted:&quot;;<br />
  }<br />
}<br />
int main()<br />
{<br />
  student sd;<br />
  system(&quot;cls&quot;);<br />
  int ch = 0;<br />
  //char ni[5];<br />
  while (ch != 7)<br />
  {<br />
    cout &lt;&lt; &quot;\n \t\t************STUDENT DATABASE************&quot;;<br />
    cout &lt;&lt; &quot;\n \t\t&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&quot;;<br />
    cout &lt;&lt; &quot;\n\n \t\t\t 1.Push the Student Record  \n\n \t\t\t 2.Pop Record&quot;;<br />
    cout &lt;&lt; &quot;\n\n \t\t\t 3.Display Records \n\n \t\t\t 0.Exit This Menu&quot;;<br />
    cout &lt;&gt; ch;<br />
    switch (ch)<br />
    {<br />
      case 1:<br />
        sd.add();<br />
        break;<br />
      case 2:<br />
        sd.pop();<br />
        break;<br />
      case 3:<br />
        sd.display();<br />
        break;<br />
      case 0:<br />
        exit(0);<br />
    }<br />
  }<br />
  getch();<br />
  return 0;<br />
}</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anuja		</title>
		<link>https://studentprojects.in/software-development/cpp/cpp-programs/cpp-data-structure/c-programs-to-implement-the-stack-adt-using-a-singly-linked-list/comment-page-1/#comment-10453</link>

		<dc:creator><![CDATA[Anuja]]></dc:creator>
		<pubDate>Tue, 25 Feb 2014 16:15:54 +0000</pubDate>
		<guid isPermaLink="false">http://studentprojects.in/?p=1011#comment-10453</guid>

					<description><![CDATA[The display function displays the list in FIFO manner..... :(  I guess changing the insert function by inserting each element at the beginning will solve the issue...]]></description>
			<content:encoded><![CDATA[<p>The display function displays the list in FIFO manner&#8230;.. 🙁  I guess changing the insert function by inserting each element at the beginning will solve the issue&#8230;</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
