I wanted to know if there are any books and PDFs on C programming for microcontrollers.
I do not have an idea about AVR Programming. So, can anyone help?
I can program in C and Java but I do not know how to program Microcontrollers using C.
Does Programming AVR Microcontrollers differ from programming PIC or any other Microcontroller?
The idea of using a moderately high level language like C or C++ is that the underlying processor architecture is largely hidden, so that at the topmost level, programming a PIC or an AVR is pretty similar.
You only have to look at the Arduino ports for ESP8266/ESP32, AVR and SAM to see how successful this approach can be.
I can program in C and Java but I do not know how to program Microcontrollers using C.
Download the Arduino IDE, start it and there you are programming the Arduino in C (actually C++). There are a whole host of Arduino specific functions available Arduino Reference page to shield you from needing to know the underlying architecture.
SagarDev:
I can program in C and Java but I do not know how to program Microcontrollers using C.
The difference between writing a program for a PC and writing a program for a Microcontroller is not in the C programming language.
It is in the huge difference in the hardware resources that are available - for example 2k rather than 2G of RAM and a 16 MHz processor speed rather than 1.6 GHz.
Once you get your head around the need keep the program small and not waste CPU cycles it will be very clear that some program features that are commonly used on a PC will not appropriate. The most common one that appears on this Forum is the String (capital S) class which can cause memory corruption in the small memory on an Arduino. Just use cstrings - char arrays terminated with 0.