its very easy .. but which controller???
Now a days all controllers have hardware I2C dedicated. means they have dedicated hardware pins and I2c protocol inbuilt in the controller, rather than old 8051 where we can configure any port pins as data and clock...
Now a days, the controler and IDE support many inbuilt functions in the form of header files, which can be directly used as API's..
IDE have inbuilt header files for I2C read and write..
which controller you are referring now...