Error in making pins input in PIC32
This is covered in the first paragraph of the I/O section of the datasheet. 



I can understand if you are new to this, so I'll give you the benefit of the doubt but the datasheet will nearly have every answer to any question you have about the device. What the defaults are, how to control it, what the features are, how to enable or disable a feature etc. Yes, the datasheet is big, and some can be well into a 1000 or more pages. So you are going to have to learn to do some reading and spend your own time investigating.