How to program this PIC Microcontroller in C language

Hi dear members,
I am new to microcontroller programming. I want to program PIC16F18345 microcontroller using C language on MPLABX IDE, XC8 compiler.
PIC16F18345 as a Embedded - Microcontroller was manufacturered by Microchip Technology. Maybe you have already know this.
Here are some Specifications of PIC16F18345 microcontroller :

[ul]Operating-Temperature: -40°C ~ 85°C (TA)
Supplier-Device-Package: 20-SOIC
Number-of-I-O: 18
Speed: 32MHz
EEPROM-Size: 256 x 8
Core-Processor: PIC
RAM-Size: 1K x 8
Program-Memory-Type: FLASH
Peripherals: Brown-out Detect/Reset, POR, PWM, WDT
Connectivity: I2C, LIN, SPI, UART/USART
Voltage-Supply-Vcc-Vdd: 2.3 V ~ 5.5 V
Core-Size: 8-Bit
Program-Memory-Size: 14KB (8K x 14)
Data-Converters: A/D 17x10b, D/A 1x5b
Oscillator-Type: Internal[/ul]

Please let me know good online tutorial where I can learn to program above said microcontrller in C language. I mean how to add headers, which header for what purpose and how to add libraries and what all libraries are available. I also need example sample program for pic16F18345.

One example, if i need to compile a program with pointer, an array what all needs to be done on mplabx ide selecting pic16f18345.
e.g.,

int a[5]={1,2,3,4,5}; void main(void) { int *p,i; p=a; for(i=0;i<5;i++) printf(“%d”,*(p+i)); }

In the same way, how to write complex program? Please let me know the tutorials.
Thanks & regards,

Try to download from microchip their hex files for yours controller, it is necessery.