#include<stdio.h>
#include<conio.h>
#include<malloc.h>
void main()
{
struct node
{
int num;
struct node *ptr;
};
typedef struct node NODE;
NODE *head, *first, *temp;
int count=0;
int choice=1;
first=NULL;
while(choice)
{
head=(NODE *)malloc(sizeof(NODE));
printf("Enter the data item\n");
scanf("%d",&head->num);
if(first!=NULL)
{
temp->ptr=head;
temp=head;
}
else
{
first=temp=head;
}
fflush(stdin);
printf("Do you want to continue(type 0 or 1)?\n");
scanf("%d",&choice);
}

temp->ptr=NULL;
temp=first;
printf("Status of the linked list is\n");
while(temp!=NULL)
{
printf("%d",temp->num);
count++;
temp=temp->ptr;
}
printf("NULL");
printf("NO of nodes in the list =%d\n",count);
getch();
}

/*output of the program*/

Enter the data item
1
Do you want to continue(type 0 or 1)?
1

Enter the data item
2
Do you want to continue(type 0 or 1)?
1
Enter the data item
3
Do you want to continue(type 0 or 1)?
1
Enter the data item
4
Do you want to continue(type 0 or 1)?
0
Status of the linked list is
1234NULLNO of nodes in the list =4

 

Home       |      About Us       |     Portfolio       |      Services       |       Career        |    Contact Us       |      Industrial Training        |      Achievement 
Corporate Services
  Web Design and development
  Web Promotion (SEO)
  Multimedia/CD Presentation
  Software development

  E.Commerce

Training@balujalabs

  Software Courses
  Hardware Courses
  Networking.Courses
  Mobile Repairing Courses
  UGC Degrees
Student Corner
 Programming & Projects
 Placement Papers
 Project Ideas
 Synopsis Ideas

  Franchise Section

 Administrator
Franchise Inquiry
 
 

Simply create in the link list and display the link lists elements.

 

 

 

 

 

 

 

 

 

                                                                                                                                          

1 Simply create in the link list and display the link lists elements.
2 Inserting and traversing the element of a linked list.
3 Simple link list program to insert and delete the modes.
4 Program to implement certain operations on a singly linked list using our own library of singly list.
5 Program to attach two singly linked lists
6 Program to insert and delete the nodes from a circular linked list.
7 Program to insert and delete the nodes from circular doubly linked list.

 

     
Home       |      About Us       |     Portfolio       |      Services       |       Career        |    Contact Us       |      Industrial Training        |      Achievement