slip 3
Write a c program to create circularly doubly linked list and display it #include <stdio.h> #include <stdlib.h> #include<conio.h> struct node { int num; struct node * nextptr; }*stnode; void ClListcreation(int n); void displayClList(); int main() { int n; stnode = NULL; printf("\n\n Circular Linked List : Create and display a circular linked list :\n"); printf("-----------------------------------------------------------------------\n"); printf(" Input the number of nodes : "); scanf("%d", &n); ClListcreation(n); displayClList(); getch(); } void ClListcreation(int n)
{
int i, num;
struct node *preptr, *newnode;
if(n >= 1)
{
stnode = (struct node *)malloc(sizeof(struct node));
printf(" Input data for node 1 : ");
scanf("%d", &num);
stnode->num = num;
stnode->nextptr = NULL;
preptr = stnode;
for(i=2; i<=n; i++)
{
newnode = (struct node *)malloc(sizeof(struct node));
printf(...