difference between the array and linked list
general difference related to memory
Answers were Sorted based on User's Feedback
Answer / shravan katta
array allocated statically
linked list dynamic memory allocation
in the linked list have to remove the node at run time
but can't remove the array node
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / dr. sanyasi naidu pasala
In array memory will be allocated during compilation, where as in linked list memory will be allocated during run time. In array memory size will be depends on size of the array. In linked list memory will be allocated according to the user requirement. In array memory will be allocated in continuous memory locations but in linked kist memory will be allocated at random locations.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
program to find a smallest number in an array
What is variable and explain rules to declare variable in c?
Explain what is the difference between a string and an array?
the data type used for unlimited value in c and how to do this program
Prove or disprove P!=NP.
How to reverse a string using a recursive function, without swapping or using an extra memory?
31 Answers Cisco, Mind Tree, Motorola, Ophio, Sony, TCS, Wipro,
#include<stdio.h> main() { int a[3]; int *I; a[0]=100;a[1]=200;a[2]=300; I=a; Printf(“%d\n”, ++*I); Printf(“%d\n”, *++I); Printf(“%d\n”, (*I)--); Printf(“%d\n”, *I); } what is the o/p a. 101,200,200,199 b. 200,201,201,100 c. 101,200,199,199 d. 200,300,200,100
what is use of loop?
A array contains dissimilar element how can we count, and A array contains dissimilar element how can we store in another array with out repetition.
What is wrong with this code such that it doesnt produce the input reversed? #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { char Space = ' '; char LineOfText; float count; LineOfText = getchar(); while ((LineOfText = getchar()) != '/n'); { count = strlen(LineOfText) - 1; while (count >= 0) { putchar(LineOfText[count]); count--; } } getchar(); return 0; }
Write a program to remove the C comments(/* */) and C++ comments(//) from a file. The file should be declared in command line.