answersLogoWhite

0


Best Answer

//Singly linked list:

#include<stdio.h>

#include<stdlib.h>

typedef struct list

{

int data;

struct list *next;

}node;

node *head = NULL;

node* create_node()

{

node *new1 =malloc(sizeof(node));

printf("\nEnter data:");

scanf("%d",&new1->data);

new1->next = NULL;

return(new1);

}

void insert_beg()

{

node *new1;

if(head 1)

insert_beg();

else

insert_after();

break;

case 3: search();

break;

case 4: display();

break;

case 5: printf("\nEnter the data to be found");

scanf("%d",&x);

find_prev(x);

break;

case 6: deletion();

break;

case 7: exit(0);

}

printf("\n\n");

}while(ch != 7);

getchar();

return 0;

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Singly list program using data structures in C?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What has the author M Main written?

M. Main has written: 'Data structures &amp; other objects using C++' -- subject(s): C++ (Computer program language), Data structures (Computer science), Object-oriented programming (Computer science) 'Data structures and other objects using Java' -- subject(s): Java (Computer program language), Data structures (Computer science) 'Data structures &amp; other objects using C++' -- subject(s): C++ (Computer program language), Data structures (Computer science), Object-oriented programming (Computer science)


Which of the following data structures can be randomly accessed giving loc A. linked list implemented using array B. singly linked list C. double linked list D. both single and double linked list?

Which of the following data structures can be randomly accessed giving loc?A. linked list implemented using arrayB. singly linked listC. double linked listD. both single and double linked listThe answer is A.


What has the author Yedidyah Langsam written?

Yedidyah Langsam has written: 'Data structures using Cand C[plus plus]' -- subject(s): C (Computer program language), Data structures (Computer science)


What has the author Guy J Hale written?

Guy J. Hale has written: 'Applied data structures using Pascal' -- subject(s): Data structures (Computer science), Pascal (Computer program language)


What has the author Michael B Feldman written?

Michael B. Feldman has written: 'Data Structures With Ada' 'Data structures with Modula-2' -- subject(s): Data structures (Computer science), Modula-2 (Computer program language) 'Data structures with Ada' -- subject(s): Ada (Computer program language), Data structures (Computer science)


What Program that will display the even numbers in data structures and algorithms?

JAVA


What has the author Thomas Plum written?

Thomas Plum has written: 'Learning to program in C' 'Efficient C' 'Reliable data structures in C' -- subject(s): C (Computer program language), Data structures (Computer science)


Data Structures and Algorithms in Java?

Data structures has been implemented in Java language already, you just need to import it and start using it. Data Structures are located in Java.util packages.ArrayArraylistVectorHashMapHashTableLinkedListStackQueueCollection this are the few I know.Thanks,Anandkumar.R


What is program data Independence?

Program data independence refers to the ability to change the data structures and organization within a database without affecting the application programs that use the data. This allows developers to modify data structures without having to rewrite or change the application code, promoting flexibility and ease of maintenance in database systems.


Is deleted Firefox private data recoverable using a file recovery program?

Your Private Data is recoverable using a File Recovery Program...such as Pixo_Rescue.


What has the author Richard F Gilberg written?

Richard F. Gilberg has written: 'Data structures' -- subject(s): C&amp;&amp; (Computer program language), Data structures (Computer science)


How do you convert infix to postfix without using data structures?

Without data-structures you cannot even store expressions, let alone convert or evaluate them.