If you are using the free tools provided by Microchip, it will have installed HI TECH C Compiler, if not you can download it from the MCHIP website.
Anyways, once it has been installed you can find UART code here:
C:\PROGRAM FILES\HI-TECH Software\PICC\LITE\X.XX\samples\usart
X.XX on my machine is 9.60
ive got the code from the same place but i dont know if my circuit is wrong can you send me the circuit diagram m have used MAX232CPE chip i gave it +5 v Supply do you think its ok. or i have to supply +15v to it? can you please show me the cuircuit
Yes, the MAX232 is supplied +5V. You also need to connect 4 capacitors to it. Do a Google image search and you'll see all the connection diagrams you could hope for.