answersLogoWhite

0


Best Answer

The most obvious reason is to store a string within a data structure. After all, a string is a null-terminated array of type char. And if we can store a simple character array in a data structure, there's nothing to stop us storing any type of array in a data structure.

As a more practical example, consider a structure that stores a name and an address. An address might be represented by 3, 4 or 5 string fields, but we could just as easily use an array of strings instead and thus cater for any number of lines (a null terminator can be used to mark the end of the array or we can store the line count in the structure itself).

As well as variable-length arrays we can also store fixed-length arrays in a structure. For instance, suppose we wished to create a record of a particular Sudoku puzzle with fields denoting the publisher, the date of publication, the level of difficulty and so on. The puzzle itself can be represented as a 9x9 array of integers within the structure itself.

User Avatar

Wiki User

7y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

Data structures could be used to implement an efficient database. Linked lists for example will optimize insertion and deletion for ordered lists.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the applications of array in data structure?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Quick sort is faster in data structure?

I think the data structure in question is array.


What is a complex data structure?

A complex data structure is the kind of structure that has two arrays. One array hols the real part of the complex data and the other array holds the imaginary part.


What is the difference between an array and structure?

An array is a collection of related data elements of same type.Structure can have elements of different types.An array is a derived data type.A structure is a programmer-defined data type.A struct can contain multiple data types, whereas an array can not.


What was the first historical data structure?

Array


How 2 write c code of array data structure?

An example: int array [10]; yaaa this is write but for a simple programs on array and all data structure visit codingdatastructure.blogspot.com


What data structure is used to store homogeneous data item?

array


Applications of data structure?

no application


What is a homogeneous data structure and why is this a weakness for RDBMS?

in homogeneous data structure all the elements of same data types known as homogeneous data structure. example:- array


What is single dimension in data structure?

Array, Stake, Queue.


What is the difference between an array of structures and an array within a structure?

The main differences between an array and a structure are: An Array is a collection of similar data items.An array is derived data type.It behave like a built in data type. An array can be increased or decreased. A structure is a collection of dissimilar data items.It is a user defined data types.It must be declared and defined.A structure element can be added if necessary.


What is a parallel array?

a parallel is data structure for representing array of records.


How array is liner data structure?

it is in sequence,a chain kind of thing