You are here

Data structures in C programming language

Data structures are inevitable part of programs. Computer programs frequently process data so we require efficient ways in which we can access or manipulate data. Some applications may require modification of data frequently and in others new data is constantly added or deleted. So we need efficient ways of accessing data so as to act on it and build efficient applications.

Array data structure

You may have studied arrays which is a data structure and has advantage of accessing any element in constant time but adding an element at the beginning or somewhere in an array is a costly operation as we have to shift other elements. Arrays may be useful when size of data is fixed. Similarly we have other data structures each offering unique advantages. We can choose which data structure to use in our program according to our requirement once we are familiar with different data structures. Some algorithms also uses particular data structure in their implementation. Some other data structures are strings, linked lists, stack, queues, trees. Each of these have further types.

Operations on data

For a given data we may wish to traverse it, search it, insert or delete data. We will perform these operations on different data structures by implementing C programs.

C data structures program