Maximum length of variable and function names?
IIRC, most C compilers have a limit of 255 characters for an identifier. You usually find all the information you need in the compiler's manual. In your case it's the MPLAB XC8 C Compiler User’s Guide:


  3.4.4.3 HOW LONG CAN I MAKE MY VARIABLE AND MACRO NAMES?
  
  The C Standard indicates that a only a specific number of initial characters in an identifier are significant, but it does not actually state what this number is and it varies from 
  compiler to compiler. For XC8, the first 255 characters are significant, but this can be 
  reduced using the -Noption; see Section 4.8.8 “-N: Identifier Length”. The fewer 
  characters there are in your variable names, the more portable your code. Using the 
  -Noption allows the compiler to check that your identifiers conform to a specific length. 
  This option affects variable and function names, as well as preprocessor macro names.
  
  If two identifiers only differ in the non-significant part of the name, they are considered 
  to represent the same object, which will almost certainly lead to code failure.


Note that it's not a good practice to have long identifier names. It makes your code harder to read &amp; understand.