what is the use of using linked list and array?

Answer Posted / raj

in linked list reduse time complexit,we can easily delete
element from thaa list,it dynamicaly allocating the memory
in array it will use wast memory for declaration ex arr[50]
u r going to declare only 10 elements then it is waste of
memory......... but for search array is good it can easly
go which element u r give for search..........

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate Source Codes from Object Codes

823


I need testPalindrome and removeSpace #include #define SIZE 256 /* function prototype */ /* test if the chars in the range of [left, right] of array is a palindrome */ int testPalindrome( char array[], int left, int right ); /* remove the space in the src array and copy it over to the "copy" array */ /* set the number of chars in the "copy" array to the location that cnt points t */ void removeSpace(char src[], char copy[], int *cnt); int main( void ) { char c; /* temporarily holds keyboard input */ char string[ SIZE ]; /* original string */ char copy[ SIZE ]; /* copy of string without spaces */ int count = 0; /* length of string */ int copyCount; /* length of copy */ printf( "Enter a sentence:\n" ); /* get sentence to test from user */ while ( ( c = getchar() ) != '\n' && count < SIZE ) { string[ count++ ] = c; } /* end while */ string[ count ] = '\0'; /* terminate string */ /* make a copy of string without spaces */ removeSpace(string, copy, ©Count); /* print whether or not the sentence is a palindrome */ if ( testPalindrome( copy, 0, copyCount - 1 ) ) { printf( "\"%s\" is a palindrome\n", string ); } /* end if */ else { printf( "\"%s\" is not a palindrome\n", string ); } /* end else */ return 0; /* indicate successful termination */ } /* end main */ void removeSpace(char src[], char copy[], int *cnt) { } int testPalindrome( char array[], int left, int right ) { }

2215


What is I ++ in c programming?

629


I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...

9659


what are # pragma staments?

1631






What does %c do in c?

587


If fflush wont work, what can I use to flush input?

617


what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

1455


How to write a code for reverse of string without using string functions?

1581


WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..

1599


How can you draw circles in C?

626


How can I write a function analogous to scanf?

661


What is the 'named constructor idiom'?

641


What is the use of function overloading in C?

680


What is the difference between printf and scanf in c?

753