What Is Data Structure
What Is Data Structure
A Data Structure is a specialized format for organizing and storing data in memory. General data structure types include array, file, record, table, tree, graph and so on. An algorithm is a concise specification of a method for solving a problem. A data structure can be viewed as consisting of a set of algorithms for performing operations on the data it stores. Data Structure is a way of storing data in a computer so that it can be used efficiently. A logical or mathematical model of a particular organization of data is called data structure. A memory play a vital role in c because all variable you declare are at first stored in the memory. Some memory allocation is done at compile time and some at runtime. Memory which is allocated and de-allocated during the execution of the program is known as dynamic memory. Memory spans and shrinks as per application requirement and this is one of major advantage of pointer. A memory can be categories in following segments Text Segment Data Segment Free Space Stack Segment
Data Segment in sub-categories in two parts Static Segment Heap Segment The Static Segment hold the global variables and the Heap Segment hold the dynamic variable. Dynamic memory allocation is done by using malloc() funtion in C.
Tree s Graph