Compilers - MPLAB® XC16 sprintf No Longer Works with Long Double
In MPLAB® XC16 C Compiler, why does using the sprintf() function print double type variables fine, but not long doubles?
This is a problem with the non-legacy standard C library. Use the compiler option for the legacy library instead. This can be found in the 'Project Properties' of MPLAB X IDE as 'Use legacy lib' under the MPLAB XC16 'Global Options'.