what is the use of using linked list and array?

Answer Posted / vaishnavi varadarajan

Use of array: All the elements are lumped together in one
block of memory. Individual elements can be accessed thru
Array index. Random access & Dynamic allocation are
possible.

Use of Linked list: Linked list allocates space for each
element separately in its own block of memory called
a "linked list element" or "node". It gets the overall
structure by using pointers to connect all its nodes
together like the links in a chain. Here the elements of
list can be accessed thru memory address (Since the pointer
stores a reference to another variable)which improves the
efficiency. Size of the list can also be modified (ie) we
can insert/delete elements of the list.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how do you determine the length of a string value that was stored in a variable?

678


What is static and volatile in c?

787


What is the difference between formatted&unformatted i/o functions?

622


Explain what is the advantage of a random access file?

672


Why do we use & in c?

597






What is the scope of global variable in c?

562


Can you explain what keyboard debouncing is, and where and why we us it? please give some examples

1666


write a program fibonacci series and palindrome program in c

636


Hi can anyone tell what is a start up code?

1624


Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.

1772


Write a program to generate the Fibinocci Series

673


What are the different types of C instructions?

685


Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80

2561


Write a code to generate divisors of an integer?

647


What are valid operations on pointers?

682