Question: what is the difference between a library function and system call?
Answer: A library function is linked to the user program and executes in user space while a system call is not linked to a user program and executes in kernel space. ... Library functions can be debugged easily using a debugger while System calls cannot be debugged as they are executed by the kernel.