I am beginning to work with micro controllers and programming them using C language.
In practice, that is an important consideration. I'm guessing that your microcontroller is something like an Arduino (or perhaps a Raspberry Pi).
In general, you need some cross-compiler. You'll then cross-compile, on your desktop system (e.g. some Linux, which is very developer friendly; but you can find cross-compilers hosted on Windows or MacOSX, for Arduinos), your source code into an executable targetted for your microcontroller and later transmit the binary executable to your microcontroller.
C is a difficult programming language.
In many cases, you might compile directly your code on your desktop (don't forget to enable all warnings and debug info, e.g. gcc -Wall -Wextra -g
with GCC), test most of it on your desktop, and later adapt it and port it for your Arduino. Debugging on your laptop or desktop some code is a lot easier than debugging on your Arduino.
You'll later cross-compile the same source code for your microcontroller.