c system call

How the c compiler differentiates the system calls and function calls?

It compiles a table of symbols into the object file - function entry points - then in the link step it looks in the object file first (the output from the compile step) then it looks in external libraries to resolve the symbol.

This is why it is bad idea to write your own function with a name matching one of the standard library functions - printf(), strcmp(), etc.