Data structure - In computer science, a data structure is a way of storing data in a computer so that it can be used efficiently. Often a carefully chosen data structure will allow a more efficient algorithm to be used. The choice of the data structure often begins from the choice of an abstract data structure. A well-designed data structure allows a variety of critical operations to be performed, using as few resources, both execution time and memory space, as possible. Data structures are implemented using the data types, references and operations on them provided by a programming language.
Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to certain tasks. For example, B-trees are particularly well-suited for implementation of databases, while routing tables rely on networks of machines to function.
Array - In computer programming, a group of homogeneous elements of a specific data type is known as an array, one of the simplest data structures. An array is similar to, but different from, a vector or list (for one-dimensional arrays) or a matrix (for two-dimensional arrays). Arrays hold a sequence of data elements, usually of the same size and data type. Individual elements are accessed by their position in the array. The position is given by an index, which is also called a subscript. The index usually uses a consecutive range of integers, (as opposed to an associative array) but the index can have any ordinal set of values. Some arrays are multi-dimensional, meaning they are indexed by a fixed number of integers, for example by a tuple of four integers. Generally, one- and two-dimensional arrays are the most common.
Structure - A structure gathers together, diffrent atoms of information that comprise a given entity.
Explaining by taking an example -
Just as the entity we call a "book" is a collection of things such as title,author, call number,publisher,number of pages,date of publication etc. As one can see all this data is dissimilar,for example author is a string, wheras number of pages is integer.For dealing with such collections there is a data type called "structure".
Syntax of structure -
struct book
{
char name;
float price;
int pages;
};
struct book b1,b2,b3;
or
struct book
{
char name;
float price;
int pages;
}b1,b2,b3;