Skip to main content

Posts

Blog Directory

..................................................................................................... Read this before accessing the blog resources For new posts please visit  https://theinsantechie.in NB: You can have access to each post in this blog by just clicking on the corresponding link given below. Note that the gadget named "Blog Archive" also includes the links to these posts. But it is easier to refer to the posts through the links provided below. ..................................................................................................... 1. Data structure programs. 2. OOP Extra Questions with Answers. 3. OOP in C++ - extra programs. 4. Quiz Questions with answers :1 5. Quiz Questions with answers :2 6. Quiz Questions with answers :3 7. Quiz Questions with answers :4 8. Quiz Questions with answers :5 9. Aptitude questions with answers. 10. Infosys Questions with Answers. 11. DS lab Extra Questions.
Recent posts

DS Extra programs_July 09

  /*1. WAP to implement searching in a linked list */   #include<iostream.h> #include<conio.h> #include<process.h>   class node {   int data;   node *next;   public:   void insert();   void search(int);   void display(); };   node *start,*head,*temp;   void node::insert() {   head=new node;   cout<<"\n Enter the data item: ";   cin>>head->data;   head->next=NULL;   if(start==NULL)   {   start=head;   }   else   {   temp=start;   while(temp->next!=NULL)   {    temp=temp->next;   }   temp->next=head;   } }   void node::display() {   temp=start;   if(start==NULL)   cout<<"\n Data list is empty ";   else   {   cout<<"\n DATA LIST: ";   while(temp!=NULL)   {    cout<<temp->data<<" ";    temp=temp->next;   }   } }   void node::search(int data) {   temp=start;   if(start==NULL)   cout<<"\n Data list is empty &