Disadvantages of Structures in C

In C programming, structure is a collection of different data items which are referenced by single name. It is also known as user-defined data-type in C.

Using structure in C language has several benefits as well as drawbacks. In this article we are going to list key drawbacks or disadvantages of structure while using it in C.

  1. Can increase complexity of the program: excessive use of structures in C increases complexity of program and program becomes difficult to manage.
  2. Slower: excessive use of structures makes programs slower due to storage overhead required for all data.
  3. Hard to manage: change in one structure variable forces change in many places in the program which makes programmer difficult to maintain and debug if there is excessive use of structure and pointer.
  4. Difficult error tracking: excessive use of structures in C increases complexity thereby making it difficult for error tracking.
  5. A steep learning curve: beginners find it difficult to use structure in C thereby making a slow learning curve.
  6. Page faults: using a lot of pointer dereferences can be a performance hit in structure due to additional memory fetch and locality of references, which may lead to page faults.