Reputation: 193
In what situations we need to use .h
file and when to use the .c
file in C.
Are they two alternatives for a same purpose?.
Please explain.
Upvotes: 1
Views: 1661
Reputation: 26703
Whenever you feel tempted to include a .c file, you instead want to add it to your project so that it gets processed during building, i.e. gets compiled by its own and in a further build step gets linked into the created binary.
Upvotes: 3