Well yes and no. Here it's an example, and i don't use the other PORTs, they're just tied to GND with some pull-down resistors... if not defined, TRISC, TRISD should have their own POR value. Usually set to $FF, have a look at the datasheet, you should find a section about the Power-On Reset values (POR)

don't worry, it works.

Make sure you have connected ALL Vss and ALL Vdd, unless it may not work as expected.

If it's still don't work, program your PIC with the code above, then read it back, save the .HEX file to another FileName and post it here.. maybe there's a strange issue somewhere. Who knows.