Posts

Showing posts from September, 2020

Delimeters

  // FDS Group D // Q.26) In any language program mostly syntax error occurs due to unbalancing  // delimiter such as (),{},[]. Write C++ program using stack to check whether // given expression is well parenthesized or not. #include   <iostream> using   namespace   std ; #define   MAX   50 class   Stack {      char   stk [ MAX ];      char   expr [ MAX ];      int   top  = - 1 ; public:      Stack ();      bool   isEmpty ();      bool   isFull ();      void   pushData ( char );      char   popData ();      bool   checkExpression (); }; Stack :: Stack () {  ...

Palindrome

// FDS Group D // Q.25) A palindrome is a string of character that‘s the same forward and backward. //         Typically,  punctuation, capitalization, and spaces are ignored. For example, //  “Poor Dan is in a  droop” is a palindrome, as can be seen by examining the  // characters “poor danisina  droop” and observing that they are the same forward  //        and backward.One way to check  for a palindrome is to reverse the characters  // in the string and then compare with them  the original-in a palindrome, the  //  ...

Pinnacle Club

// FDS Group C /* Department of Computer Department has Student's Club Named "Pinnacle Club". Students of Second, Third And Final Year of Department Can Be Granted Membership On Request. Similarly One May Cancel The Membership Of Club.First Node Is Reserved For President Of Club And Last Node Is Reserved For Secretary Of Club.Write C++ Program To Maintain Club Member's Information Using Singly Linked List.Store Student's PRN And Name.Write Functions To : A) Add And Delete The Members As Well As President Or Even Secretary.         B) Compute Total Number Of Members of Club. C) Display Members. D) Two Linked List Exists For Two Divisions. Concatenate Two LinkedLists. */ #include <iostream> using namespace std; class Node { public: string PRN; string className; string Name; Node * next ; }; class PinnacleClub : public Node { public: Node *head; Node *tail; PinnacleClub(); // Constructer Declaration void Cr...