There are a lot of excellent answers how can one simulate object oriented concepts with C. To name a few:
- C double linked list with abstract data type
- C as an object oriented language
- Can you write object-oriented code in C?
When is it appropriate to use such simulation and not to use languages that support object-oriented techniques natively?
Highly related:
I’ll give you the one reason I know of because it has been the case for me:
When you are developing software for a unique platform, and the only available compiler is a C compiler. This happens quite often in the world of embedded microcontrollers.