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
Explain how can I write functions that take a variable number of arguments?
What Is The Difference Between Null And Void Pointer?
Explain how can I open a file so that other programs can update it at the same time?
Why & is used in c?
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
What is the difference between declaring a variable by constant keyword and #define ing that variable?
Tell me can the size of an array be declared at runtime?
Can a variable be both static and volatile in c?
writ a program to compare using strcmp VIVA and viva with its output.
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
What are high level languages like C and FORTRAN also known as?
How to delete a node from linked list w/o using collectons?
Tell me what is null pointer in c?
Why is c called "mother" language?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile