what is difference between array and structure?
Answer Posted / chaudhary paresh
- Array elements are homogeneous. Structure elements are of
different data type.
- Array allocates static memory and uses index / subscript
for accessing elements of the array. Structures allocate
dynamic memory and uses (.) operator for accessing the
member of a structure.
- Array is a pointer to the first element of it. Structure
is not a pointer
- Array element access takes less time in comparison with
structures.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How #define works?
What is the difference between new and malloc functions?
What is the correct declaration of main?
What are pointers? Why are they used?
What is integer constants?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
What are pointers?
What is hashing in c language?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
What is data structure in c programming?
How can I ensure that integer arithmetic doesnt overflow?
When a c file is executed there are many files that are automatically opened what are they files?
Can an array be an Ivalue?
What is typedef example?
What are 3 types of structures?