Skip to main content

Posts

Showing posts from December, 2020

Array Data Structure in C

Array Data Structure      An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together. This makes it easier to calculate the position of each element by simply adding an offset to a base value, i.e., the memory location of the first element of the array (generally denoted by the name of the array).      The above image can be looked as a top-level view of a staircase where you are at the base of the staircase. Each element can be uniquely identified by their index in the array (in a similar way as you could identify your friends by the step on which they were on in the above example). Array’s size :- In C language array has the fixed size meaning once size is given to it. It can’t change i.e. can’t shrink it, can’t expand it. The reason was that for expanding if we change the size we can’t be sure ( it’s not possible every time) that we get the next memory location to us as free. The shrinking will not work beca

Data Structures in C

  Data Structures A  data structure  is a particular way of organizing data in a computer so that it can be used effectively. Here are list of all data structures present in C language :- Array Linked list Stack Queue Binary Tree Binary Search Tree Heap Hashing Graph  Matrix Misc These are some basic data structures present in C. Don't stop learning read all these articles to know more.