I don't know the answer to your question, but you will need to provide more details to get a proper response to your question. For example:
- Is your matrix A square?
- What is the size/order of A?
- When using C/LAPACK, what data types have you cast for A?
- Are your results only slightly different or dramatically different?
MATLAB using DOUBLE arithmetic for all internal operations. If you are not using real64 types in C, then you might be accumulating quantisation errors...