K&R 2-7 - Invert a bitfield from a number
Just a few notes, since the code is so short:


Put your main after all of your other function declarations so you don't have to declare the function prototypes at the top.
You don't have to return 0 at the end of main(). The C standard  knows how frequently this is used, and lets us omit it.


  C99 &amp; C11 §5.1.2.2(3)
  
  ...reaching the } that terminates the main() function returns a
  value of 0. 

Move your comment to the top of the function and explicitly say what the parameters are and what the output will be.
Your function parameter names could be better:

unsigned invert(unsigned num, int position, int num_bits)

Those parameters to your function could be declared const
Does your function perform as is supposed to with negative numbers?  Zeros?  Other edge cases?  You should have more tests in your code to make sure you get the expected behavior, and if not handle those edge cases more appropriately.  Use assert from the standard library header &lt;assert.h&gt; to help with this.