what is difference between array and structure?
Answer Posted / vinay
Array -
* Memory (array size) is fixed
* Accessing an element in array takes constant time. E.g. -
5th element in an array can be accessed as array[4] i.e.
searching/accessing an element in array takes comparatively
less time than in structures.
* Adding/deleting an element in the array is comparatively
difficult since the data already present in the array needs
to be moved
Structure -
* Memory (structure size) can be changed dynamically
* Accessing an element in a list takes more time
comparatively since we need to traverse thro the list
* Adding/deleting takes less time than in arrays
| Is This Answer Correct ? | 208 Yes | 28 No |
Post New Answer View All Answers
code for find determinent of amatrix
Explain what are linked list?
Wt are the Buses in C Language
What is variable in c example?
What is scope and lifetime of a variable in c?
How will you divide two numbers in a MACRO?
What does %2f mean in c?
What are the different types of endless loops?
How do you determine a file’s attributes?
How do you list files in a directory?
How many parameters should a function have?
What are integer variable, floating-point variable and character variable?
Why do we use return in c?
How pointers are declared?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration