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
Is c is a procedural language?
What is %s and %d in c?
Why should I prototype a function?
Who developed c language?
Explain how do you determine whether to use a stream function or a low-level function?
Explain what is wrong with this statement? Myname = ?robin?;
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.
Explain why can’t constant values be used to define an array’s initial size?
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
What's the total generic pointer type?
what are bit fields? What is the use of bit fields in a structure declaration?
Why do we write return 0 in c?
Write a program to check armstrong number in c?
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
Can you write the function prototype, definition and mention the other requirements.