Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the difference between malloc calloc and realloc in c?

1069


What is the use of pointers in C?

1023


‎How to define structures? · ‎

1031


What is static and auto variables in c?

1020


What is wild pointer in c?

1018


What does nil mean in c?

1182


What is #line used for?

989


What is pointers in c?

1067


How is a pointer variable declared?

1022


Tell me what are bitwise shift operators?

1091


What is the difference between #include and #include 'file' ?

1001


What is atoi and atof in c?

1028


What does static variable mean in c?

1059


write a program to find out prime number using sieve case?

2036


What is the sizeof () operator?

1017