what is the difference between arrays and linked list

Answer Posted / vasu kanneganti

1.array is fixed length and Array is a simple sequence of
numbers which are not concerned about each-others positions
but linked list is variable length
2.in array values are accessing easy but linked list is
some time taken process bcoz search aither forword or
backword
3.in array updating operations are time taken comparing
with linkedlist
4.array is not growble and linkedlist is growble

Is This Answer Correct ?    42 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

1654


What is the right way to use errno?

610


Write the test cases for checking a variable having value in range -10.0 to +10.0?

1806


What are preprocessor directives?

661


What is ctrl c called?

580






if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

694


Can a variable be both static and volatile in c?

594


Explain the difference between exit() and _exit() function?

621


What is structure packing in c?

593


What does the file stdio.h contain?

595


What is getch() function?

636


What is malloc and calloc?

556


What is a nested loop?

637


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 ) { }

2197


write a c program to find the sum of five entered numbers using an array named number

1610